Line 0
Link Here
|
|
|
1 |
Commons of Python micro-functions. This is basically an out-sourced, shared |
2 |
utils module. |
3 |
|
4 |
Rules: |
5 |
|
6 |
- Must work in Python 2 and Python 3 |
7 |
- Cannot depend on anything but six and the standard library |
8 |
|
9 |
Functions: |
10 |
|
11 |
- is_sequence: check if something is list-ish |
12 |
- is_mapping: check if an object is dict-ish |
13 |
- ensure_list: make sure an argument is a list, or make it into a single-element |
14 |
list |
15 |
- clean_dict: remove null values from a dict, recursively |
16 |
- decode_path: decode a path name to be unicode |
17 |
- hash_data: generate a SHA1 from a dict of reasonable objects |
18 |
|
19 |
WWW: https://github.com/pudo/banal |