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 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

banal-1.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file banal-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: banal-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for banal-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 318701725015375e2e87589406a9c9f300f5a6c696c24e9f4ce5847163fe1ddd
MD5 11510951d0ba6d9536fd7ddb84a7f585
BLAKE2b-256 4cccb36bc69862e057a51b47e2ce4a74e4bb81bed77dcf3a54fd71a05b9c99dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for banal-1.1.2-py3-none-any.whl:

Publisher: build.yml on pudo/banal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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