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.19.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.19.0
File Size Uploaded
dhis2w_core-1.19.0.tar.gz 678.7 kB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / dhis2w_core-1.19.0.tar.gz

Download URL dhis2w_core-1.19.0.tar.gz
Size 678.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7cec5d69a97134af57fd07048598b65fa229bd7aaa769ee820f13cc6e52f2d97
BLAKE2b-256 checksum
How to use checksums
7b177084232b8a5cfae98febd340b2da08c244e08b91478621b7d745ed71d172
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 11, 2026.

Transparency log

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

Download URL dhis2w_core-1.19.0-py3-none-any.whl
Size 859.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8f77979b6778bd4b1cc7300745694dfa897780a83e31c284b08fc2ea47aeffc
BLAKE2b-256 checksum
How to use checksums
2d6c3f4d3cce601f6fc31437070d67f3fbacaf21cf14f64c66b6677637e79f9a
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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

1.24.0

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.0

2 release files

This release

1.19.0 This release

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