Skip to main content

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

MIT License.

Release files for watchfor 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for watchfor 0.4.0
File Size Uploaded
watchfor-0.4.0.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for watchfor 0.4.0
File Interpreter ABI Platform
watchfor-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.5 kB

Release files / watchfor-0.4.0.tar.gz

Download URL watchfor-0.4.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18b8c62872e5af156d8ef75d209360ba5bb7d5d2002ad976efc66eed82cb8103
BLAKE2b-256 checksum
How to use checksums
fdccd2e9e8cc66393283878d93b7859bbb3935d258bba934fddd46d89a90b7ea
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.4.0-py3-none-any.whl

Download URL watchfor-0.4.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87c8691205b613b906194b3ce017d6ed4f8c2ded3036ed4d35e39ad0356fdd40
BLAKE2b-256 checksum
How to use checksums
fe1e82e75f4760274c764701d626d2e10f48811fbce094cea1e36970e159cf8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page