Skip to main content

dhis2w-core

Shared runtime for dhis2w-cli and the dhis2w-mcp MCP server: 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 (the MCP plugin pack, in its own repository), 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,44}.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,44}/plugins/<name>/ (per-version subpackage; one tree per DHIS2 major) with service.py (typed business logic) and cli.py (Typer commands). The plugin's FastMCP tools live in the dhis2w-mcp pack as dhis2w_mcp/tools/v{N}/<name>.py — 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.

Metadata

Release files for dhis2w-core 1.32.2

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.32.2
File Size Uploaded Provenance
dhis2w_core-1.32.2.tar.gz 781.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 1.7 MB

Release files / dhis2w_core-1.32.2.tar.gz

Download URL dhis2w_core-1.32.2.tar.gz
Size 781.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c9ad65f22f6baecb8efa4068467783f95b3f4588ef515c74c48a6bf93dff258b
BLAKE2b-256 checksum
How to use checksums
1bc1be2e82378ddeffafa02aef619812baa4d23b7e10a7137bcf76dd3977a95f
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 Oct 20, 2026.

Transparency log

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

Download URL dhis2w_core-1.32.2-py3-none-any.whl
Size 940.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bc94508ed30cccf436127e5d423ff9ededb4905f983181863d9830bfe56ad18
BLAKE2b-256 checksum
How to use checksums
7cb7029cd38efbd8620a2afcb50f76d09d39a624f71639cbca83548ab52560c5
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 Oct 20, 2026.

Transparency log

Security for dhis2w-core 1.32.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dhis2w_core-1.32.2.tar.gz

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 Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.32.2 This release

2 release files Full provenance

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