Shared DHIS2 tooling runtime: profile discovery, plugin registry, auth factory, token store, first-party plugins.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dhis2w_core-0.11.0.tar.gz.
File metadata
- Download URL: dhis2w_core-0.11.0.tar.gz
- Upload date:
- Size: 648.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
251478826beedbe8d6caf056bd5bbe4711f1affc43f926ce9ee542f48f7dea4f
|
|
| MD5 |
78a03ec464ce822a0c37cda8f5d90260
|
|
| BLAKE2b-256 |
9f52c0189cf1c83af0a54329e20508b010aac4f1f2b6efa9f776efec33f3cc6f
|
Provenance
The following attestation bundles were made for dhis2w_core-0.11.0.tar.gz:
Publisher:
pypi-publish.yml on winterop-com/dhis2w-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dhis2w_core-0.11.0.tar.gz -
Subject digest:
251478826beedbe8d6caf056bd5bbe4711f1affc43f926ce9ee542f48f7dea4f - Sigstore transparency entry: 1520520907
- Sigstore integration time:
-
Permalink:
winterop-com/dhis2w-utils@fb919b58f1749f41deb6cb6605447ab5a9504719 -
Branch / Tag:
refs/tags/v0.11.0 - Owner: https://github.com/winterop-com
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@fb919b58f1749f41deb6cb6605447ab5a9504719 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dhis2w_core-0.11.0-py3-none-any.whl.
File metadata
- Download URL: dhis2w_core-0.11.0-py3-none-any.whl
- Upload date:
- Size: 824.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4811b8d20cbb5d945c461874bc85f671814f7fab120dfa50dc088130512e3aea
|
|
| MD5 |
2aa73935efc51fd08694ed1ce8668bb8
|
|
| BLAKE2b-256 |
cef6b65cc513f597ff4e5e2c4dd28d26b6702792d357e9228395224fefb03acf
|
Provenance
The following attestation bundles were made for dhis2w_core-0.11.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on winterop-com/dhis2w-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dhis2w_core-0.11.0-py3-none-any.whl -
Subject digest:
4811b8d20cbb5d945c461874bc85f671814f7fab120dfa50dc088130512e3aea - Sigstore transparency entry: 1520520996
- Sigstore integration time:
-
Permalink:
winterop-com/dhis2w-utils@fb919b58f1749f41deb6cb6605447ab5a9504719 -
Branch / Tag:
refs/tags/v0.11.0 - Owner: https://github.com/winterop-com
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@fb919b58f1749f41deb6cb6605447ab5a9504719 -
Trigger Event:
push
-
Statement type: