Commons of banal micro-functions for Python.
Project description
banal
Commons of Python micro-functions. This basically an out-sourced, shared utils module with a focus on functions that buffer type uncertainties in Python (e.g. "is this a list?").
Rules:
- Functions are properly typed, library passes
mypy
. - Cannot depend on anything but six and the standard library
Functions
is_listish
: check if something is list-ishis_mapping
: check if an object is dict-ishensure_list
: make sure an argument is a list, or make it into a single-element listclean_dict
: remove null values from a dict, recursivelydecode_path
: decode a path name to be unicodehash_data
: generate a SHA1 from a dict of reasonable objects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
banal-1.0.6.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for banal-1.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 877aacb16b17f8fa4fd29a7c44515c5a23dc1a7b26078bc41dd34829117d85e1 |
|
MD5 | 417bc1688ab56ea65f9b9cb31a9a7154 |
|
BLAKE2b-256 | aec47f6e6a539cc6b2da4da3b6a58d5e6f9342c870522ee46d41f8cbd2156953 |