Skip to main content

HDX Python Utilities for streaming tabular data, date and time handling and other helpful functions

Project description

Build Status Coverage Status Ruff Downloads

The HDX Python Utilities Library provides a range of helpful utilities for Python developers. Note that these are not specific to HDX.

  1. Easy downloading of files with support for authentication, streaming and hashing
  2. Retrieval of data from url with saving to file or from data previously saved
  3. Date utilities
  4. Loading and saving JSON and YAML (maintaining order)
  5. Dictionary and list utilities
  6. HTML utilities (inc. BeautifulSoup helper)
  7. Compare files (eg. for testing)
  8. Simple emailing
  9. Easy logging setup and error logging
  10. State utility
  11. Path utilities
  12. URL utilities
  13. Text processing
  14. Stable file hashing
  15. Matching utilities
  16. Encoding utilities
  17. Check valid UUID
  18. Easy building and packaging

For more information, please read the documentation.

This library is part of the Humanitarian Data Exchange (HDX) project. If you have humanitarian related data, please upload your datasets to HDX.

Development

Environment

Development is currently done using Python 3.13. The environment can be created with:

    uv sync

This creates a .venv folder with the versions specified in the project's uv.lock file.

Pre-commit

pre-commit will be installed when syncing uv. It is run every time you make a git commit if you call it like this:

    pre-commit install

With pre-commit, all code is formatted according to ruff guidelines.

To check if your changes pass pre-commit without committing, run:

    pre-commit run --all-files

Packages

uv is used for package management. If you’ve introduced a new package to the source code (i.e. anywhere in src/), please add it to the project.dependencies section of pyproject.toml with any known version constraints.

To add packages required only for testing, add them to the [dependency-groups].

Any changes to the dependencies will be automatically reflected in uv.lock with pre-commit, but you can re-generate the files without committing by executing:

    uv lock --upgrade

Project

uv is used for project management. The project can be built using:

    uv build

Linting and syntax checking can be run with:

    uv run ruff check

To run the tests and view coverage, execute:

    uv run pytest

Documentation

The documentation, including API documentation, is generated using ReadtheDocs and MkDocs with Material. As you change the source code, remember to update the documentation at documentation/index.md.

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

hdx_python_utilities-4.1.2.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

hdx_python_utilities-4.1.2-py3-none-any.whl (65.1 kB view details)

Uploaded Python 3

File details

Details for the file hdx_python_utilities-4.1.2.tar.gz.

File metadata

  • Download URL: hdx_python_utilities-4.1.2.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hdx_python_utilities-4.1.2.tar.gz
Algorithm Hash digest
SHA256 f054b267251686478ac76b2551e047211fd78bed61886de38c8217c365a860b3
MD5 dc0349e97cda0c754e10274807462ee3
BLAKE2b-256 2e967a6ba9ed08a8c9439d2875fa37e8e4303c8f17c7d8b4a6f41b50b2341d8c

See more details on using hashes here.

File details

Details for the file hdx_python_utilities-4.1.2-py3-none-any.whl.

File metadata

  • Download URL: hdx_python_utilities-4.1.2-py3-none-any.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hdx_python_utilities-4.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31200985910953354d7c44ca5795184534463f783b01c13868d15594f7ab4828
MD5 00c215f681a2c7b29b5f4c707bdefa77
BLAKE2b-256 b597752da03ba533e64f889c819b17f1054f82af32e0c20e3afdf43a62a73626

See more details on using hashes here.

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