dhis2w-core
Shared runtime for dhis2w-cli and dhis2w-mcp: profile discovery, plugin registry, auth factory, token store, and the first-party plugins (metadata, data, analytics, users, tracker, files, messaging, apps, route, maintenance, doctor, customize, system, profile, dev).
dhis2w-core is the bridge between dhis2w-client (the pure async API client) and the user-facing surfaces (CLI, MCP). End users typically don't install this directly — they install dhis2w-cli or dhis2w-mcp which pull dhis2w-core in transitively.
Install
# Direct (rare — usually you want dhis2w-cli or dhis2w-mcp instead)
uv add dhis2w-core
What's in the box
- Profile system — auto-discovers a profile from
.dhis2/profiles.toml(CWD walk-up) or~/.config/dhis2/profiles.toml.Profilemodel +profile_from_env()env-var fallback. - Plugin registry — walks
dhis2w_core.v{41,42,43}.plugins.*plusentry_points("dhis2.plugins")for external plugins. Each plugin exposesregister_cli(app)andregister_mcp(server). - Auth factory — turns a
Profileinto the matchingAuthProviderfromdhis2w-client, wires the token store, manages OAuth2 PKCE redirect capture. - Token store — SQLite-backed (
aiosqlite) at.dhis2/tokens.sqlite, keyed by profile name. open_client(profile)context manager — the canonical "give me a connected client" entry point for plugin services.
Plugins shipped
metadata, data, analytics, tracker, user, user_group, user_role, route, apps, messaging, files, maintenance, doctor, customize, system, profile, dev, browser (CLI-only, opt-in via [browser] extra).
Each plugin lives at packages/dhis2w-core/src/dhis2w_core/v{41,42,43}/plugins/<name>/ (per-version subpackage; one tree per DHIS2 major) with service.py (typed business logic), cli.py (Typer commands), and mcp.py (FastMCP tools) — both surfaces call the same service.py.
Documentation
Full architecture: https://winterop-com.github.io/dhis2w-utils/architecture/overview/.
dhis2w-core is one member of the dhis2w-utils workspace.
Release files for dhis2w-core 1.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dhis2w_core-1.8.3.tar.gz | 1.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dhis2w_core-1.8.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.3 MB
Release files / dhis2w_core-1.8.3.tar.gz
| Download URL | dhis2w_core-1.8.3.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83a6f80dbf45566d2de3546816e9395bc373427fd464533535394f602d31bf9f
|
|
BLAKE2b-256 checksum How to use checksums |
70a755f7a18a19eacb21feb9b2a0cd8b61f8b89c1177711f8e3df955485bf77d
|
| 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 Aug 24, 2026.
Transparency logRelease files / dhis2w_core-1.8.3-py3-none-any.whl
| Download URL | dhis2w_core-1.8.3-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b78630de288272e4ddd8375284b4ec5bf107a1d42fe06efc743e58c9de98c192
|
|
BLAKE2b-256 checksum How to use checksums |
011af3589a56e69f41649a08629f222377d5b18adc7eba1f53db07d396e47894
|
| 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 Aug 24, 2026.
Transparency log