devhelm Python SDK.
Client initialization
Configuration options
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
token | str | Yes | DEVHELM_API_TOKEN env | API token |
base_url | str | — | https://api.devhelm.io | API base URL |
org_id | str | — | DEVHELM_ORG_ID env or "1" | Organization ID |
timeout | float | — | 30.0 | Request timeout in seconds |
Resource namespaces
client.monitors
| Method | Signature | Returns |
|---|---|---|
list() | () -> list | Auto-fetches all pages |
list_page(page, size) | (int, int) -> Page | Single 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?) -> CursorPage | Cursor pagination |
versions(id, page?, size?) | (int | str, int?, int?) -> Page |
client.incidents
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
list() | () -> list | |
list_page(page, size) | (int, int) -> Page | |
get(slug) | (str) -> dict | By slug |
create(body) | (dict) -> dict | |
update(slug, body) | (str, dict) -> dict | |
delete(slug) | (str) -> None |
client.secrets
| Method | Signature | Returns |
|---|---|---|
list() | () -> list | Metadata 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
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
list() | () -> list | |
list_page(page, size) | (int, int) -> Page | |
create(body) | (dict) -> dict | Full key only at creation |
revoke(id) | (int | str) -> None | |
delete(id) | (int | str) -> None |
client.dependencies
| Method | Signature | Returns |
|---|---|---|
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
| Method | Signature | Returns |
|---|---|---|
acquire(body) | (dict) -> dict | |
current() | () -> dict | None | |
release(lock_id) | (int | str) -> None | |
force_release() | () -> None |
client.status
| Method | Signature | Returns |
|---|---|---|
overview() | () -> dict |
Pagination types
Page
| Property | Type | Description |
|---|---|---|
data | list | Items in this page |
has_next | bool | Whether more pages exist |
has_prev | bool | Whether previous pages exist |
CursorPage
| Property | Type | Description |
|---|---|---|
data | list | Items in this page |
next_cursor | str | None | Cursor for the next page |
has_more | bool | Whether more items exist |
Pydantic models
The SDK includes generated Pydantic models for type validation:Next steps
Error handling
Handle exceptions and retries.
Async usage
Use the async client for concurrent operations.