skillfed

libhxl

Python support library for the Humanitarian Exchange Language (HXL). See http://hxlstandard.org and https://github.com/HXLStandard/libhxl-python

libhxl v5.2.2 114.3K downloads/30d#12,302 on PyPI42
License unclear Active released

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 libhxl

uv

uv add libhxl

poetry

poetry add libhxl

Installing 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

humanitarian data exchange languageHXL data processinghumanitarian dataset filteringHXL validation and transformationcrisis data standardizationhumanitarian information exchangeHXL CSV JSON conversion
humanitarian-datadata-validationetl

More Markup packages