Skip to main content

HDX Python database utilities

Project description

Build Status Coverage Status Ruff Downloads

The HDX Python Database Library provides utilities for connecting to databases in a standard way including through an ssh tunnel if needed. It is built on top of SQLAlchemy and simplifies its setup.

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


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_database-1.3.9.tar.gz (111.8 kB view details)

Uploaded Source

Built Distribution

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

hdx_python_database-1.3.9-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file hdx_python_database-1.3.9.tar.gz.

File metadata

  • Download URL: hdx_python_database-1.3.9.tar.gz
  • Upload date:
  • Size: 111.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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_database-1.3.9.tar.gz
Algorithm Hash digest
SHA256 4174b4f44534e4e769685dc4f7c2c7e5641be02cc5ef41983dbd935828c4b93a
MD5 c6953ef6e3dfea65182b8921ea044a09
BLAKE2b-256 afa081b4d1e0baf7d729e7be8c02b99985967aeed0b7fb451d7eeb6adc035b4f

See more details on using hashes here.

File details

Details for the file hdx_python_database-1.3.9-py3-none-any.whl.

File metadata

  • Download URL: hdx_python_database-1.3.9-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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_database-1.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 97187dd9d5aa0c43669912af04f281b09f81c31b13931ba428d1194d5e9a4ae9
MD5 b76adf4d8c930f9c1bcc3cac97988986
BLAKE2b-256 318811f5c4cf429378024478b77afffa23872699b03fee8cb00047d3a140198d

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