watchfor (Python)
Official Python SDK + CLI for WatchFor — uptime & infrastructure monitoring (monitors, alert rules, incidents, maintenance windows) over the REST API. Zero dependencies (standard library only).
There is also a TypeScript SDK, an MCP server and an A2A agent for AI agents.
Install
pip install watchfor
Quick start
from watchfor import WatchFor
wf = WatchFor(api_key="wf_live_...") # create keys in Settings → API keys
# One-call org snapshot
print(wf.summary())
# List monitors
for m in wf.monitors.list()["data"]:
print(m["name"], m["status"])
# Create a monitor (idempotency key optional, for safe retries)
mon = wf.monitors.create(
{
"name": "example.com",
"type": "http",
"target": "https://example.com",
"interval": 300,
"locations": ["<location-id>"], # from wf.locations()
},
idempotency_key="create-example-1",
)
# Diagnose: firing incidents right now
for inc in wf.incidents.list(status="firing")["data"]:
print(inc["message"], inc["severity"])
Resource namespaces: wf.monitors, wf.alert_rules, wf.incidents,
wf.maintenance_windows, wf.contacts, wf.contact_groups. Top-level:
wf.summary(), wf.plan(), wf.me(), wf.locations(), wf.monitor_types(),
wf.incident_stats(period=...), wf.notifications(...), wf.activity(...).
Errors raise WatchForError with .status, .code and .message.
CLI
export WATCHFOR_API_KEY=wf_live_...
watchfor summary
watchfor monitors
watchfor incidents --status firing
watchfor checks <monitor_id>
watchfor report --period 30d
Auth & scopes
Keys carry a scope: read (all GET endpoints) or write (read plus
create/update/delete). See
authentication. The API is also
reachable via OAuth 2.1 for MCP clients.
Reference
- OpenAPI spec: https://watchfor.io/openapi.json
- Guides: https://watchfor.io/docs/api
MIT License.
Release files for watchfor 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| watchfor-0.3.0.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| watchfor-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / watchfor-0.3.0.tar.gz
| Download URL | watchfor-0.3.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e3560eb15bfc786be8b9b19d70aa725456db619b2bfdb08653797ad50d9c047
|
|
BLAKE2b-256 checksum How to use checksums |
80d0c326f20de84615edc415de540c65c13ffe319c273b8f826b7e9550b25bdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / watchfor-0.3.0-py3-none-any.whl
| Download URL | watchfor-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29e9ba64fefbbf7030360c2499cdc245ef9bc8c8eff5af155ba2a720a4eace97
|
|
BLAKE2b-256 checksum How to use checksums |
ce86ee0bdc01f1acfa8e4ee9c08373e7db7959fb001ac1167cbc05a0b89a9ecb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|