dirigent-dhis2
Documentation: https://winterop-com.github.io/dirigent-dhis2/
The DHIS2 adapter pack for dirigent. It
contributes the dhis2 connection kind, two JSON Schema formats (dhis2-uid and
dhis2-period), and the blocks that speak DHIS2's asynchronous jobs, import summaries,
completeness registrations, metadata, tracker and analytics reads as first-class steps,
rather than composing them out of raw HTTP:
| Block | Kind | What it does |
|---|---|---|
dhis2.analytics_run |
operator | Submits the analytics tables job and follows its task notifications to the end. |
dhis2.analytics_query |
operator | Runs one analytics query, aggregate or event/enrollment, and hands the grid on. |
dhis2.data_value_set_export |
operator | Reads a data value set for a data set, period and org unit, inline or to storage. |
dhis2.data_value_set_import |
operator | Imports a data value set, parsing the import summary and its conflicts. |
dhis2.metadata |
operator | Reads one metadata collection through the version-bound generic accessor. |
dhis2.tracker |
operator | Reads a page of tracked entities, enrollments or events from /api/tracker. |
dhis2.data_set_complete |
sensor | Holds a run until a data set is marked complete for the period. |
Every block classifies its failures the dhis2w-client way: an instance whose version the client does not speak is refused rather than retried, and a transport failure is transient.
An instance discovers the pack by installing it: the dirigent.plugins.v1 entry point in
pyproject.toml is the whole registration.
Install
Install the pack into the dirigent image:
uv pip install dirigent-dhis2
or add it to a project:
uv add dirigent-dhis2
Develop
uv sync --locked
uv run ruff format --check . && uv run ruff check .
uv run mypy && uv run pyright
uv run pytest
That is what CI runs. The lock file is committed and CI syncs against it, so a pack build is reproducible; the ecosystem's nightly integration is what proves the pack against the
tests/ exercises every block against a mocked DHIS2 instance, and tests/test_examples.py
validates the example documents against the pack's own catalog. The examples run standalone,
each carrying the connection it uses.
Examples
One file per operation, grouped by how it is built:
| Shelf | What is in it |
|---|---|
examples/dhis2/ |
The native adapter: exports and their import strategies, the sign-off gate, the analytics reads and rebuilds, the three tracker collections, the metadata reads. |
examples/dhis2-compose/ |
A dhis2.* block beside one of the engine's own: a schema gate, a jq reshape, a fan-out over org units. |
examples/dhis2-http/ |
The generic-HTTP way, for what no adapter covers: a CSV export, a period range, a completion registration, a stage-scoped event read. |
examples/validate/ |
A metadata read held to a shape: a fields= projection gated on validate.schema, with the schema carried and named. |
examples/schemas/ |
The JSON Schemas that pin the reads the DHIS2 series makes, applied on their own. |
Each shelf's README lists its files one line each.
Licence
Copyright (c) 2026 Morten Olav Hansen. All rights reserved. See LICENSE.
The source is published for reference only: no licence to use, copy, modify or distribute it is granted, and any use beyond reading requires written permission.
Release files for dirigent-dhis2 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dirigent_dhis2-0.10.0.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dirigent_dhis2-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.8 kB
Release files / dirigent_dhis2-0.10.0.tar.gz
| Download URL | dirigent_dhis2-0.10.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b49128a8e2aa2f40c3b77af1e6da7001fd931985e74d369cad4bb9cb2aefa3b
|
|
BLAKE2b-256 checksum How to use checksums |
7511ab210a48cc3295ab21f59264a724cbfaccce593a84861c521d7519f02fb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / dirigent_dhis2-0.10.0-py3-none-any.whl
| Download URL | dirigent_dhis2-0.10.0-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de6cd43c40817e68cbe86c090f3e5fad77e75a63595574afd4fd20c947a17800
|
|
BLAKE2b-256 checksum How to use checksums |
980fad877585a582252a6f76f5c2daf3bce26b932293176371e6a5e166f43695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency log