Generated-model helpers¶
Version selection + module loading for the codegen-produced modules (dhis2w_client.generated.v{N}).
generated
¶
Version-scoped generated clients. Populated by dhis2 codegen.
Classes¶
Dhis2
¶
Bases: StrEnum
DHIS2 major version that dhis2w-client has a generated client for.
Members mirror the directory names under dhis2w_client/generated/. Use as a
typed hint when you want to pin the client to a specific version instead of
letting it auto-detect via /api/system/info:
from dhis2w_client import Dhis2, Dhis2Client
async with Dhis2Client(url, auth=auth, pin_version=Dhis2.V42) as client:
...
Source code in packages/dhis2w-client/src/dhis2w_client/generated/__init__.py
Functions¶
available_versions()
¶
Return the version keys that have been populated by codegen.
Walks the generated/ folder, imports each v\d+ subpackage, and returns
only the ones whose __init__.py set GENERATED = True.