Registry / data / hdx-python-utilities

hdx-python-utilities

JSON →
library4.1.2pypypiunverified

Supporting utilities for the HDX Python ecosystem, including streaming tabular data (CSV/JSON/Excel), date/time handling, URL manipulation, file I/O, and general helper functions. Current version 4.0.8, requires Python >=3.10, follows weekly release cadence.

pip install hdx-python-utilities
INSTALL
IMPORT
SIG · HDX-PYTHON-UTILITI
H
hdx-python-utilities
datapythonv4.1.2
Install
10.5s avg
Import
Disk
80MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 78.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.5s · import 0.000s · 79MB
80MB installed
● package 80MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

save_iterable_to_csv
from hdx.utilities.file_handler import save_iterable_to_csv
from hdx.utilities.file_handler import save_iterable_to_csv

Load CSV and save iterable as CSV. Requires Python >=3.10.

from hdx.utilities.loader import load_csv from hdx.utilities.file_handler import save_iterable_to_csv # Load a CSV file filepath = 'data.csv' data = load_csv(filepath) # Save an iterable (list of dicts) to CSV records = [{'name': 'Alice', 'age': 30}, {'name': 'Bob', 'age': 25}] save_iterable_to_csv(records, 'output.csv', headers=['name', 'age']) print('Done')
Debug
Known issues
breakingPython 3.10+ required starting from version 4.0.0. Older Python versions (3.6, 3.8, 3.9) are no longer supported.
fix
Upgrade to Python 3.10 or later, or pin to hdx-python-utilities<4.0.0 if you must use an older Python.
affects: >=4.0.0
breakingURL-related functions (get_filename_from_url, get_filename_extension_from_url, get_path_for_url, get_url_for_get, get_url_params_for_post) moved from loader module to url module in 4.0.4. Old imports will break.
fix
Change imports from 'hdx.utilities.loader' to 'hdx.utilities.url' for these functions.
affects: >=4.0.4
gotchasave_iterable expects headers to be list of strings ordered as desired. For a list of dicts, if headers are not specified, they are inferred from the first dict's keys, which may not preserve order or include all keys.
fix
Always provide explicit headers list when saving tabular data to ensure correct column order and completeness.
affects: all
deprecatedFunctions that returned None in edge cases (e.g., row_function returning None) now handle that edge case properly. Old code relying on None may break.
fix
Update code to handle the new behavior where None is no longer returned unexpectedly. Test your row functions.
affects: >=4.0.8
Upgrade
Version history
4.1.2latest on PyPI · released Jun 16, 2026
Audit
Dependencies
hdx-python-countryoptionalUsed for country-level operations
hdx-python-apioptionalUsed for HDX API interactions
tabliboptionalUsed for tabular data formatting
Agent activity
12 hits · last 30 days
node
10
Meta
1
Resources
hdx-python-utilities — pip install hdx-python-utilities · libregistry