libhxl
Python support library for the Humanitarian Exchange Language (HXL). See http://hxlstandard.org and https://github.com/HXLStandard/libhxl-python
What it is and what it does
libhxl is a Python library for working with data in the Humanitarian Exchange Language (HXL) standard, a tagging system designed for humanitarian crisis data. It provides a fluent API for reading HXL-tagged datasets from URLs, files, or stdin, then filtering, transforming, and validating them using chainable operations. The library treats data transformation as lazy evaluation, processing only what is needed to minimize memory use.
The package includes both a programmatic API and command-line scripts. Developers use it to read datasets, apply filters (like selecting rows by criteria or sorting), validate against schemas, and serialize output to CSV, JSON, or raw arrays. It integrates with requests for URL handling and supports caching to reduce repeated network calls.
Use it for:
- Filter and validate humanitarian crisis datasets against HXL schemas before ingestion into analysis pipelines
- Convert HXL-tagged CSV or Excel files to JSON for web applications or APIs
- Count and aggregate humanitarian data by tags (e.g., count cases by country or sector)
- Standardize and clean multi-source humanitarian datasets using HXL tag-based transformations
- Build command-line tools for humanitarian organizations to process and validate field data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
libhxl reads, filters, validates, and transforms data in the Humanitarian Exchange Language (HXL) standard format from files, URLs, or data sources, with chainable filters and multiple output generators.
Yes, if you work with Humanitarian Exchange Language data. The package is actively maintained, has no known vulnerabilities, and provides a complete toolkit for HXL workflows. High install friction (10 dependencies) is a minor drawback, but standard for data processing libraries. Verify the unclear license status before use in proprietary contexts.
Install
libhxl on PyPI
pip
pip install libhxluv
uv add libhxlpoetry
poetry add libhxlInstalling libhxl
Before you install
High install friction due to 10 runtime dependencies including requests, structlog, and xlrd3. The package is actively maintained with recent commits (last on 2026-04-27) and has been in development since 2015, suggesting stable API and dependency management.
License in practice
License treatment is unclear—no SPDX identifier or raw license metadata is present in the package metadata. The description mentions Public Domain release, but verify actual license terms before use in proprietary or restricted contexts.
Quickstart
pip install libhxl
import hxl
url = "https://example.org/dataset.csv"
data = hxl.data(url).with_rows("#country=Somalia").sort("#org")
for line in data.gen_csv():
print(line)
Requires Python 3; versions prior to 4.6 also supported Python 2.7. High number of dependencies (10 runtime packages) may require resolution in constrained environments.
Verify before relying
- Exact Python version support (description states Python 3 required but does not specify minimum minor version)
- Whether all 10 runtime dependencies are truly required or some are optional
- Current maintenance cadence and release frequency beyond the last commit date
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | 10 — jsonpath_ng, ply, python-dateutil, python-io-wrapper, requests, structlog, unidecode, urllib3, wheel, xlrd3 |
| Maintenance | actively maintained — 658 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 114,339/month — #12,302 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: libhxl-5.2.2.tar.gz
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
hdx-python-countryMaps country and region codes and names,…
permissive · top 15,000 on PyPI
backports.csvProvides Python 3's csv module API for Python…
unclear · top 15,000 on PyPI
pylightxlReads and writes Microsoft Excel files (.xlsx,…
permissive · top 15,000 on PyPI
hdx-python-utilitiesProvides a collection of utilities for Python…
permissive · top 15,000 on PyPI
babelfishBabelFish provides Python objects for…
permissive · top 15,000 on PyPI
hishelHishel is an HTTP caching library for Python…
permissive · top 5,000 on PyPI
importlibProvides importlib.import_module() for Python…
unclear · top 15,000 on PyPI
pyxlsbParses Excel 2007-2010 Binary Workbook (xlsb)…
copyleft · top 5,000 on PyPI
phonenumbersParse, validate, format, and analyze…
permissive · top 1,000 on PyPI
pyhclParses HCL (HashiCorp Configuration Language)…
copyleft · top 5,000 on PyPI