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>
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.
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 watchfor-0.1.0.tar.gz.
File metadata
- Download URL: watchfor-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae571bac1cab04a43e7471f41980ac0fbfe4b42a377b4103903ec417aeba04ca
|
|
| MD5 |
a4430e11a0aa9fd2727099e2729e8b5a
|
|
| BLAKE2b-256 |
b6e99e11c5f67298ba9440f0e96a5feaa05e0439197f0384725865c55b0513d4
|
File details
Details for the file watchfor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: watchfor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27688b0a6ddb9eb5cf60cc9b7ba475b36014723255ba7ca09267742fbd33cca7
|
|
| MD5 |
6c222a8fd3193acbffab8106225e0209
|
|
| BLAKE2b-256 |
7ecb83a0e13745331396eda0bd41a51188aa631207b97c87db4995cea4933b6c
|