Skip to main content

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-ish
  • is_mapping: check if an object is dict-ish
  • ensure_list: make sure an argument is a list, or make it into a single-element list
  • clean_dict: remove null values from a dict, recursively
  • decode_path: decode a path name to be unicode
  • hash_data: generate a SHA1 from a dict of reasonable objects

Project details


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.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

banal-1.0.4-py2.py3-none-any.whl (6.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file banal-1.0.4.tar.gz.

File metadata

  • Download URL: banal-1.0.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for banal-1.0.4.tar.gz
Algorithm Hash digest
SHA256 7940f0a32d8b4a52a94dd52d79d8d49f51c8dcc61a23a3c69a58a40129d98cc3
MD5 c01b2c9233a3ac2d94f7c9297312338b
BLAKE2b-256 77bbdd8f9433c3c4d4a56ae7cc9af13bd4475d98217eed13e0e9ff093b067492

See more details on using hashes here.

File details

Details for the file banal-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: banal-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for banal-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 939c5e03822e9a4446abfead6b30e3480a8e03c5bab55ac23993aa138c92ac99
MD5 3aa2749a5ba83caefe1bf435dcf97ecd
BLAKE2b-256 85779b9d2bd26b7d785f3d49f39bef95037f10968b4a3d80b6923aac48fd671a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page