govcitizenhub-sdk
Official Python SDK for Govcitizenhub — a citizen-services / e-government platform on the Burdenoff platform.
The client defaults to the GovCitizenHub production gateways. Workspace queries require a GovCitizenHub account with access to the selected workspace.
This SDK is a thin shell over burdenoff-sdk-libs. It mounts the shared platform modules plus the Govcitizenhub domain module and a standalone sandbox module, and exposes them as one ergonomic, fully typed client.
Features
- Async/await throughout, built on
httpx - Dual-endpoint GraphQL client (workspace + global gateways)
- 23 mounted modules: the shared generic set +
govcitizenhub+sandbox - Multiple auth flows: email/password, device code, PKCE, client credentials
- Automatic token refresh
- Typed error hierarchy
- Full type hints with
py.typedmarker
Installation
pip install govcitizenhub-sdk
# Development install
pip install -e ".[dev]"
Quick Start
Set GOVCITIZENHUB_USERNAME, GOVCITIZENHUB_PASSWORD, GOVCITIZENHUB_WORKSPACE_ID,
and GOVCITIZENHUB_ORGANIZATION_ID for an account that can access the workspace.
import asyncio
import os
from burdenoff_sdk_libs.modules.auth.types import SignInInput
from govcitizenhub_sdk import GovcitizenhubSDK
async def main():
# Defaults to the shared prod gateways and the burdenoff_cli_govcitizenhub
# OIDC client. Override the endpoints for local dev.
sdk = GovcitizenhubSDK()
try:
await sdk.auth.sign_in(
SignInInput(
username=os.environ["GOVCITIZENHUB_USERNAME"],
password=os.environ["GOVCITIZENHUB_PASSWORD"],
)
)
await sdk.auth.issue_workspace_token(
workspace_id=os.environ["GOVCITIZENHUB_WORKSPACE_ID"],
organization_id=os.environ["GOVCITIZENHUB_ORGANIZATION_ID"],
)
agencies = await sdk.govcitizenhub.agencies.list()
tags = await sdk.tags.list()
print(f"Found {len(agencies)} agencies and {len(tags.items)} tags")
finally:
await sdk.close()
asyncio.run(main())
Nested namespace
Per the platform mandate (no compatibility shim), every module surface is nested under its owning module. The Govcitizenhub domain bundle keeps its sub-entities nested:
await sdk.govcitizenhub.agencies.list()
await sdk.govcitizenhub.services.list()
await sdk.govcitizenhub.applications.list()
await sdk.govcitizenhub.documents.list()
await sdk.govcitizenhub.case_notes.list()
await sdk.govcitizenhub.grievances.list()
await sdk.govcitizenhub.permits.list()
await sdk.govcitizenhub.payments.list()
await sdk.govcitizenhub.system.health()
Modules
All methods are async. The following modules are mounted on the GovcitizenhubSDK
instance: auth, billing, channels, conversations, devportal,
export, files, govcitizenhub, groups, health, integrations,
notifications, organizations, products, rbac, sandbox, scheduler,
security, store, support, tags, tours, workspaces.
Configuration
from govcitizenhub_sdk import GovcitizenhubSDK
sdk = GovcitizenhubSDK(
workspace_endpoint="https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
global_endpoint="https://graphql.burdenoff.com/global/graphql",
client_id="burdenoff_cli_govcitizenhub", # default
oidc_issuer=None, # derived from global_endpoint
api_key=None,
access_token=None,
refresh_token=None,
workspace_token=None,
timeout=30.0,
auto_refresh=True,
)
Error Handling
from burdenoff_sdk_libs.modules.auth.types import SignInInput
from govcitizenhub_sdk import (
GovcitizenhubError,
AuthenticationError,
AuthorizationError,
NetworkError,
ValidationError,
RateLimitError,
DeviceCodeExpiredError,
DeviceCodeDeniedError,
)
try:
await sdk.auth.sign_in(SignInInput(username=username, password=password))
except AuthenticationError:
print("Invalid credentials")
except NetworkError:
print("Could not reach the API")
except GovcitizenhubError as e:
print(f"SDK error: {e}")
Development
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
make format # black + isort
make lint # flake8
make type-check # mypy (strict)
make test # pytest
make sanity # format-check + lint + type-check + test (cov>=80) + build
License
Proprietary — Copyright Burdenoff Consultancy Services Pvt. Ltd.
Support
- Issues: GitHub Issues
Metadata
Release files for govcitizenhub-sdk 2026.1123.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| govcitizenhub_sdk-2026.1123.1.tar.gz | 17.4 kB | Without provenance | Details for govcitizenhub_sdk-2026.1123.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| govcitizenhub_sdk-2026.1123.1-py3-none-any.whl | Python 3 | none | any | Details for govcitizenhub_sdk-2026.1123.1-py3-none-any.whl |
Total release size: 25.8 kB
Release files / govcitizenhub_sdk-2026.1123.1.tar.gz
| Download URL | govcitizenhub_sdk-2026.1123.1.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce7f51aceaff88e55a373ae77fb85c75f85a5e2df2155a926076a9a5e36fb396
|
|
BLAKE2b-256 checksum How to use checksums |
2c9f66b7732b74168c8a6e8e6562f6617f1679fd3a5bf613c01d152da1176a21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / govcitizenhub_sdk-2026.1123.1-py3-none-any.whl
| Download URL | govcitizenhub_sdk-2026.1123.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5aabf1b67f3e116145cce842c0639205c1329a3dc125890980bdb78eb91d238
|
|
BLAKE2b-256 checksum How to use checksums |
8242fb51a0a07df0a16a1231a8c4fd76aadbf69325198c1496d7ee016e6da397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for govcitizenhub-sdk 2026.1123.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.