Skip to main content
Complete reference for the devhelm Python SDK.

Client initialization

from devhelm import Devhelm

client = Devhelm(
    token="dh_live_xxxxxxxx",
    base_url="https://api.devhelm.io",  # optional
    org_id="1",                          # optional
    timeout=30.0,                        # optional, seconds
)

Configuration options

ParameterTypeRequiredDefaultDescription
tokenstrYesDEVHELM_API_TOKEN envAPI token
base_urlstrhttps://api.devhelm.ioAPI base URL
org_idstrDEVHELM_ORG_ID env or "1"Organization ID
timeoutfloat30.0Request timeout in seconds

Resource namespaces

client.monitors

MethodSignatureReturns
list()() -> listAuto-fetches all pages
list_page(page, size)(int, int) -> PageSingle page
get(id)(int | str) -> dict
create(body)(dict) -> dict
update(id, body)(int | str, dict) -> dict
delete(id)(int | str) -> None
pause(id)(int | str) -> dict
resume(id)(int | str) -> dict
test(id)(int | str) -> dict
results(id, cursor?, limit?)(int | str, str?, int?) -> CursorPageCursor pagination
versions(id, page?, size?)(int | str, int?, int?) -> Page

client.incidents

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
create(body)(dict) -> dict
resolve(id, message?)(int | str, str?) -> dict
delete(id)(int | str) -> None

client.alert_channels

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
create(body)(dict) -> dict
update(id, body)(int | str, dict) -> dict
delete(id)(int | str) -> None
test(id)(int | str) -> dict

client.notification_policies

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
create(body)(dict) -> dict
update(id, body)(int | str, dict) -> dict
delete(id)(int | str) -> None
test(id)(int | str) -> None

client.tags

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
create(body)(dict) -> dict
update(id, body)(int | str, dict) -> dict
delete(id)(int | str) -> None

client.environments

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(slug)(str) -> dictBy slug
create(body)(dict) -> dict
update(slug, body)(str, dict) -> dict
delete(slug)(str) -> None

client.secrets

MethodSignatureReturns
list()() -> listMetadata only
list_page(page, size)(int, int) -> Page
create(body)(dict) -> dict
update(key, body)(str, dict) -> dict
delete(key)(str) -> None

client.resource_groups

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
create(body)(dict) -> dict
update(id, body)(int | str, dict) -> dict
delete(id)(int | str) -> None
add_member(group_id, body)(int | str, dict) -> dict
remove_member(group_id, member_id)(int | str, int | str) -> None

client.webhooks

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
create(body)(dict) -> dict
update(id, body)(int | str, dict) -> dict
delete(id)(int | str) -> None
test(id)(int | str) -> dict

client.api_keys

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
create(body)(dict) -> dictFull key only at creation
revoke(id)(int | str) -> None
delete(id)(int | str) -> None

client.dependencies

MethodSignatureReturns
list()() -> list
list_page(page, size)(int, int) -> Page
get(id)(int | str) -> dict
track(slug)(str) -> dict
delete(id)(int | str) -> None

client.deploy_lock

MethodSignatureReturns
acquire(body)(dict) -> dict
current()() -> dict | None
release(lock_id)(int | str) -> None
force_release()() -> None

client.status

MethodSignatureReturns
overview()() -> dict

Pagination types

from devhelm import Page, CursorPage

Page

PropertyTypeDescription
datalistItems in this page
has_nextboolWhether more pages exist
has_prevboolWhether previous pages exist

CursorPage

PropertyTypeDescription
datalistItems in this page
next_cursorstr | NoneCursor for the next page
has_moreboolWhether more items exist

Pydantic models

The SDK includes generated Pydantic models for type validation:
from devhelm import CreateMonitorRequest, MonitorDto

request = CreateMonitorRequest.model_validate({
    "name": "API Health",
    "type": "HTTP",
    "config": {"url": "https://api.example.com/health"},
    "frequencySeconds": 60,
})

Next steps

Error handling

Handle exceptions and retries.

Async usage

Use the async client for concurrent operations.