Skip to main content

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. Profile model + profile_from_env() env-var fallback.
  • Plugin host — a pluginkit manager that walks dhis2w_core.v{41,42,43}.plugins.* plus the dhis2w.plugins.v1 entry-point group for external packs. Each plugin answers the contribute(version_key) extension point with a Contribution naming its CLI and MCP modules.
  • Auth factory — turns a Profile into the matching AuthProvider from dhis2w-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/architecture/overview/.

dhis2w-core is one member of the dhis2w workspace.

Release files for dhis2w-core 1.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dhis2w-core 1.22.0
File Size Uploaded
dhis2w_core-1.22.0.tar.gz 678.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dhis2w-core 1.22.0
File Interpreter ABI Platform
dhis2w_core-1.22.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / dhis2w_core-1.22.0.tar.gz

Download URL dhis2w_core-1.22.0.tar.gz
Size 678.6 kB
Tags Source
SHA-256 checksum
How to use checksums
34e7a07aeaeea774de1ba13109212bf708dc43f78a96d96e1f5e3e20264a041a
BLAKE2b-256 checksum
How to use checksums
4fb131223c2cc18fee9b33eec663bc246ec9f16de0ccba8c5ac5a5c4cb3f322e
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 14, 2026.

Transparency log

Release files / dhis2w_core-1.22.0-py3-none-any.whl

Download URL dhis2w_core-1.22.0-py3-none-any.whl
Size 859.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fe15d3147994c28cd2445627df577926a68b4b5f2715eeca2e5e0418cd4262b
BLAKE2b-256 checksum
How to use checksums
f198c67f7aae147b0a81c0a56becb1ef51ec3c38e70c70c19bc86a2ea2acbc4f
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

1.24.0

2 release files

1.23.0

2 release files

This release

1.22.0 This release

2 release files

1.21.0

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.18.0

2 release files

1.17.0

2 release files

1.16.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.9.0

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.99.0

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page