Official Python SDK for WardenPoint incident alerting
Project description
WardenPoint Python SDK
Official Python SDK for WardenPoint — incident alerting and on-call escalation. Fire and manage alerts from your apps, jobs and pipelines; page on-call automatically when code fails.
Install
pip install wardenpoint
Quickstart
from wardenpoint import WardenPoint
wp = WardenPoint(api_key="wp_live_xxx") # or set WARDENPOINT_API_KEY
# send to a recipient (UUID or exact name) at a priority
wp.alerts.send(recipient="ops-oncall", message="DB primary down", priority="high")
# send to a whole group
wp.alerts.send_to_group(group="<group-uuid>", message="API SLO burn", priority="critical")
# fire a pre-configured template
wp.templates.fire("disk-full", vars={"host": "web-3", "pct": 95}, override={"priority": "high"})
# inspect / acknowledge / cancel
wp.alerts.list()
wp.alerts.status("<id>")
wp.alerts.acknowledge("<uuid>")
wp.alerts.cancel("<uuid>")
wp.recipients.list()
Priorities: low, normal, high, critical.
templates.fire(...) requires alert templates to be enabled for your company
(a per-tenant setting in the dashboard); otherwise the call returns an
APIError.
Page automatically when code fails
The context manager and decorator alert on-call with the exception and traceback if the wrapped code raises — then re-raise, so behaviour is unchanged otherwise. A delivery failure never masks your original error.
# context manager
with wp.guard(group="sre", title="nightly ETL"):
run_etl()
# decorator for jobs
@wp.on_failure(to="ops-oncall", priority="high")
def reconcile_invoices():
...
Configuration
| Setting | Argument | Environment |
|---|---|---|
| API key | api_key= |
WARDENPOINT_API_KEY |
| Base URL | base_url= |
WARDENPOINT_BASE_URL (default https://wardenpoint.com/api/v1) |
| TLS verify | verify= |
— (set False only for self-hosted/staging with self-signed certs) |
WardenPoint is also a context manager (closes the HTTP client on exit):
with WardenPoint(api_key="...") as wp:
wp.alerts.send(recipient="...", message="...")
Errors
wardenpoint.APIError— non-2xx response (.status,.message,.body).wardenpoint.WardenPointError— config / validation / resolution errors.
Development
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wardenpoint-0.1.0.tar.gz.
File metadata
- Download URL: wardenpoint-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ff772264c5fd59a05d2adf921ef9d16686bbe1ec03a466c3f13c2348ad9dd95
|
|
| MD5 |
929efb00fdd94b25b1b39bec11a0a5db
|
|
| BLAKE2b-256 |
585257da9c5f14d060235696e30e8466e5467922c2aeab52fff9099b46eeb3d9
|
Provenance
The following attestation bundles were made for wardenpoint-0.1.0.tar.gz:
Publisher:
release.yml on WardenPoint/wardenpoint-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wardenpoint-0.1.0.tar.gz -
Subject digest:
2ff772264c5fd59a05d2adf921ef9d16686bbe1ec03a466c3f13c2348ad9dd95 - Sigstore transparency entry: 1820245380
- Sigstore integration time:
-
Permalink:
WardenPoint/wardenpoint-python@e64bdc401fab92037e631bd825f9c5b8471e0d4b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WardenPoint
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e64bdc401fab92037e631bd825f9c5b8471e0d4b -
Trigger Event:
release
-
Statement type:
File details
Details for the file wardenpoint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wardenpoint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0a654126fa5abe0c07cf0c0b94cfe83aea3ad792e41ed61ab40f12d82b5dd73
|
|
| MD5 |
5c6069acfc561f37dbf9e4b29680577a
|
|
| BLAKE2b-256 |
aae258dad4a9d8e4aedaf82c784353ff64bd08652220fdd861e25c0082b94bbc
|
Provenance
The following attestation bundles were made for wardenpoint-0.1.0-py3-none-any.whl:
Publisher:
release.yml on WardenPoint/wardenpoint-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wardenpoint-0.1.0-py3-none-any.whl -
Subject digest:
c0a654126fa5abe0c07cf0c0b94cfe83aea3ad792e41ed61ab40f12d82b5dd73 - Sigstore transparency entry: 1820245631
- Sigstore integration time:
-
Permalink:
WardenPoint/wardenpoint-python@e64bdc401fab92037e631bd825f9c5b8471e0d4b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WardenPoint
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e64bdc401fab92037e631bd825f9c5b8471e0d4b -
Trigger Event:
release
-
Statement type: