devhelm Python package is a typed, synchronous client for the DevHelm REST API. It’s built on httpx, ships full Pydantic models for every request and response, and has full mypy strict-mode type coverage.
The Python SDK is synchronous. There’s no
AsyncDevhelm client as of v1.3.0 — for concurrent usage, run the sync client in a thread pool (see async usage).Install
Initialize
| Constructor parameter | Type | Default | Description |
|---|---|---|---|
token | str | "" | API token. Falls back to the DEVHELM_API_TOKEN env var when empty. |
base_url | str | https://api.devhelm.io | API base URL — override for self-hosted. |
org_id | str | None | None | Sets x-phelm-org-id header. Falls back to DEVHELM_ORG_ID env var, then "1". |
workspace_id | str | None | None | Sets x-phelm-workspace-id header. Falls back to DEVHELM_WORKSPACE_ID env var, then "1". |
timeout | float | 30.0 | Per-request timeout in seconds. |
Create a monitor
The SDK accepts request bodies as plain dicts (validated against the Pydantic request model) or as Pydantic instances. Both produce the sameMonitorDto response:
managedBy is optional — omit it (defaults to API server-side) or set it
explicitly to one of API, DASHBOARD, CLI, TERRAFORM, or MCP to
record the provenance for drift detection.
Or using the typed request class:
List monitors
Get check results
results() returns a CursorPage — call it with cursor=results.next_cursor to fetch the next batch.
Manage incidents
Create an alert channel
channelType discriminator inside config (slack, email, discord, pagerduty, …) — there is no top-level type field on this request.
Error handling
Next steps
Client reference
Every resource and method available on the client.
Concurrency patterns
Run the sync client concurrently with thread pools and asyncio.