Scan your whole stack
Are you using watchfor?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.28.0
watchfor was last scanned on 28 Nov 2026 at version 0.28.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.28.0 LATEST | 28 Nov 2026 | No rules fired |
| 0.27.0 | 24 Nov 2026 | No rules fired |
| 0.26.0 | 22 Nov 2026 | No rules fired |
| 0.25.1 | 21 Nov 2026 | Not shown |
| 0.25.0 | 19 Nov 2026 | Not shown |
Findings for v0.28.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.28.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
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.
pip install watchfor
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"])
# False positive? Keep the resolved incident on record but drop it from
# uptime, SLA, reports and the status page (include() undoes it)
wf.incidents.exclude(19351, reason="Probe-side DNS hiccup")
# Post-mortem: creates the draft on first use; only the sections you name change
wf.incidents.update_postmortem(19351, {
"sections": {"summary": "Checkout returned 502 for 14 minutes."},
"add_action_items": [{"title": "Validate upstreams in CI"}],
})
# Irreversible: wipe a monitor's checks and incidents; uptime restarts "since reset"
wf.monitors.reset(mon["id"])
# Page integrity: after a deploy, check the pages and accept what that check saw
wf.monitors.accept_baseline(integrity_monitor_id, fresh=True)
# MCP servers: before a release, keep tool drift quiet for 30 minutes (downtime still pages);
# a drift incident the user confirms was theirs is accepted as an expected change
wf.monitors.set_expected_change_window(mcp_monitor_id, window=30, note="v2.4 release")
wf.incidents.accept_expected_change(19352, note="New search tool shipped in v2.4")
# Browser checks: try a Playwright script once (nothing saved), then read the result
run = wf.playwright.test_run(script=script, target="https://shop.example.com")
wf.playwright.get_test_run(run["id"]) # status: queued | running | done | error
wf.variables.put("LOGIN_PASSWORD", value=password, secret=True)
wf.variables.put("LOGIN_PASSWORD", value=new_password) # rotate: it stays a secret
# The same org secrets in HTTP/API/MCP checks: {{NAME}} in auth, a header or the body
wf.variables.put("API_TOKEN", value=token, secret=True)
wf.monitors.update(api_monitor_id, {"config": {"requestHeaders": [
{"key": "Authorization", "value": "Bearer {{API_TOKEN}}"}]}})
# Older checks: pass next_cursor back as cursor (keep the same hours/success)…
page = wf.monitors.checks(mon["id"], hours=24, limit=100)
if page["next_cursor"]:
wf.monitors.checks(mon["id"], hours=24, limit=100, cursor=page["next_cursor"])
# …or let the client walk the pages (see "Retries and paging")
for check in wf.monitors.iter_checks(mon["id"], hours=24, success=False):
print(check["timestamp"], check["error"])
# Delete a contact group that alert rules still use (409 without force)
wf.contact_groups.delete("<group-id>", force=True)
# What the alerting engine sees right now: alerted, recovering 1/3, confirming 2 of 3…
state = wf.monitors.get(mon["id"])["alerting_state"]
# Response times on a real time axis (5-min buckets for 24h, 15 min for 7d)
up = wf.monitors.uptime(mon["id"], "24h", series=True)
for b in up.get("response_time_series", []):
print(b["at"], b["avg_ms"])
# Thresholds by region suggested from the monitor's own checks — any
# region_scoped metric: game latency by default, metric="packet_loss"
# (values in %), or an HTTP monitor's metric="response_time"
sug = wf.monitors.suggested_thresholds("<game-monitor-id>")
for r in sug["regions"]:
print(r["region"], r["p95"], r["warning"], r["critical"])
# Pause up to 100 monitors at once; post a status-page announcement
wf.monitors.bulk("pause", ["<id-1>", "<id-2>"])
notice = wf.status_pages.create_announcement(
"<page-id>", {"title": "Checkout errors", "body": "We are looking into it."}
)
wf.status_pages.update_announcement(
"<page-id>", notice["id"], {"body": "Fixed.", "status": "resolved"}
)
Pages, their components and announcements are all manageable from code (since 0.28.0):
page = wf.status_pages.create(
{"slug": "acme", "name": "Acme Status",
"components": [{"name": "Website", "monitorTags": ["prod-web"]}]}
)
# A component that mirrors part of GitHub's own status page
gh = wf.third_party_services.get("github")
mirror = wf.status_pages.create_component(
page["id"],
{"name": "GitHub", "thirdPartyServiceSlug": "github",
"thirdPartyComponents": gh["components"][:2]},
)
ids = [c["id"] for c in wf.status_pages.components(page["id"])["data"]]
wf.status_pages.reorder_components(
page["id"], [mirror["id"]] + [i for i in ids if i != mirror["id"]]
)
# Visitors must enter a password; None removes it
wf.status_pages.update(page["id"], {"password": "s3cret-pass"})
# Fix an announcement's title and severity without a timeline entry
wf.status_pages.update_announcement(
page["id"], "<announcement-id>", {"title": "Checkout errors in the EU", "severity": "major"}
)
Run any of 27 checks from WatchFor's probe fleet against any public target, monitored or not — this measures right now, rather than reading what WatchFor recorded:
# What can I run, and how much budget is left?
catalog = wf.diagnostics.list()
# One check, optionally from a location you choose (plan-gated)
dns = wf.diagnostics.run(
"dns-lookup", "example.com", options={"recordType": "A", "resolver": "8.8.8.8"}
)
# A closed port, NXDOMAIN, expired certificate or unresolvable host does NOT
# raise — "success" is False and "error" says why ("result" keeps the raw answer):
if not dns["success"]:
print("finding:", dns["error"])
print("runs left this hour:", dns["remaining"])
# Graded checks (tls-grade, http-headers, cwv-check, mcp-check, email-health,
# mail-server-check, cdn-check, smart-audit, dns-health, php-version-checker,
# software-exposure-checker) also return the
# dashboard's WatchFor Grade: letter, rubric id and what holds it down
headers = wf.diagnostics.run("http-headers", "https://example.com")
grade = headers.get("grade") or {}
if grade.get("letter"):
print(f"grade {grade['letter']} ({grade['rubric']})")
for cap in grade["capped_by"]:
print(f" max {cap['cap']}: {cap['title']} — fix: {cap['fix']}")
else:
print("not graded:", grade.get("not_graded_reason"))
# The whole picture in one call: DNS + propagation + TLS + HTTP + ping
# from up to 3 regions, aggregated into one verdict
report = wf.diagnostics.diagnose_target("example.com")
print(report["verdict"]["status"], report["verdict"]["summary"])
Runs need a write key (a probe sends real traffic from WatchFor's IPs)
and spend the same per-plan hourly allowance as the dashboard Toolbox.
Details: https://watchfor.io/docs/api/diagnostics
Resource namespaces: wf.organizations, wf.monitors, wf.alert_rules, wf.incidents,
wf.hosts, wf.status_pages, wf.third_party_services, wf.on_call, wf.notification_channels, wf.maintenance_windows, wf.contacts, wf.contact_groups,
wf.diagnostics, wf.playwright, wf.variables. Top-level:
wf.summary(), wf.plan(), wf.me(), wf.locations(), wf.monitor_types(),
wf.incident_stats(period=...), wf.report(...), wf.notifications(...),
wf.activity(...), wf.batch([...]), wf.metrics(...).
Errors raise WatchForError with .status, .code, .message and
.retry_after (seconds, on a 429). A non-JSON answer (an HTML page from a
wrong base URL or a proxy) is a short http_error / invalid_response
pointing at the base URL. base_url (and the CLI's WATCHFOR_BASE_URL)
takes the origin (https://watchfor.io) or the full base
(https://watchfor.io/api/v1) — the same value works for the npm and Ruby
SDKs. It must be https:// (plain http:// only for localhost — the key
would travel unencrypted), and a request times out after timeout seconds
(default 30). A timeout and a connection that fails (DNS, refused, reset,
TLS) raise WatchForError with status 0 and code timeout or
network_error. Ids are percent-encoded into the path; an empty, . or
.. id raises WatchForError (status 0, code invalid_request) before
anything is sent.
Since 0.27.0. Both are opt-in; without them the client behaves exactly as before.
wf = WatchFor(api_key="wf_live_...", max_retries=3)
# Every resolved incident, fetched page by page as the loop needs them
for incident in wf.incidents.iter_all(status="resolved"):
print(incident["id"], incident["message"])
max_retries (default 0 = off): a 429 is retried for every
method — the API refused the call before doing anything. A 5xx, a
timeout or a network error is retried only for GET, PATCH, PUT and
DELETE, or for a POST sent with an idempotency_key: a plain POST could
run twice. Other 4xx never, nor an id refused before sending (status
0, invalid_request). Waits follow Retry-After (seconds or an HTTP
date), else exponential backoff with jitter from 0.5 s.max_retry_delay (seconds, default 30): the longest single wait. A
Retry-After longer than that is not waited out — WatchForError is
raised at once with .retry_after.monitors.iter_all(),
monitors.iter_checks(id), monitors.iter_runs(id),
incidents.iter_all(), hosts.iter_all(),
notification_channels.iter_all(), maintenance_windows.iter_all(),
contacts.iter_all(), contact_groups.iter_all(),
status_pages.iter_announcements(id), iter_notifications() and
iter_activity(). They take the same filters as list() (limit = page
size, cursor = where to start), fetch the next page only when the loop
reaches it, and stop on the last page.An API key belongs to one organization. An OAuth access token acts as
the user who approved it, so it reaches every organization that user
belongs to; choose one with organization — the SDK sends it as the
X-WatchFor-Organization header on every request:
wf = WatchFor(api_key=oauth_access_token)
for org in wf.organizations.list()["data"]:
print(org["id"], org["name"], org["role"], org["is_default"], org["is_current"])
acme = WatchFor(api_key=oauth_access_token, organization="<organization-id>")
acme.me() # {"organization": {"id", "name", "slug"}, "scope": ...}
other = acme.with_organization("<another-organization-id>") # new client, same token
other.monitors.list()
organizations.list() returns the ids to use: every organization of the
token's user with their role, is_default (used without organization)
and is_current (what this client acts on). With an API key it returns just
the key's own organization (role is None).organization, an OAuth token acts on the user's oldest owned
organization (else their oldest membership).403 forbidden), and their role there applies: members read, acknowledge
incidents and run diagnostics; changes need owner or admin.403 forbidden (a key never
switches organization).with_organization(None) drops the header again.Details: https://watchfor.io/docs/api/authentication#how-oauth-maps-to-your-data
text = wf.metrics(tag="production") # Prometheus text format
Usually you point Prometheus at https://watchfor.io/api/v1/metrics directly; this is for scripts and one-off checks. See https://watchfor.io/docs/api/prometheus.
export WATCHFOR_API_KEY=wf_live_...
watchfor summary
watchfor monitors example.com
watchfor incidents --status firing --limit 10
watchfor checks <monitor_id> --failed [--cursor <next_cursor>]
watchfor report --period 30d
watchfor plan # also: locations, monitor-types
watchfor me # which organization + scope
watchfor organizations # ids for --organization
# OAuth token: pick the organization (anywhere on the line) or via the environment
export WATCHFOR_API_KEY=<oauth-access-token>
watchfor --organization <organization-id> monitors
WATCHFOR_ORGANIZATION=<organization-id> watchfor summary
The three CLIs take the same commands, options and exit codes (0 done,
1 the API or the network failed, 2 wrong usage — an unknown command or
option is refused, never ignored). --json prints the API's JSON, the same
in all three; without it the npm CLI prints a short readable summary, while
the Python and Ruby CLIs always print the JSON. Base URLs must be
https:// (plain http:// only for localhost).
Keys carry a scope: read (all GET endpoints) or write (read plus
create/update/delete). See
authentication. The API is also
reachable with OAuth 2.1 access tokens (pass one as api_key; see
Organizations).
MIT License.
./publish.sh # build, check, confirm, upload
./publish.sh --build # build and check only
Debian and Ubuntu mark the system Python "externally managed" (PEP 668), so
pip install build twine is refused and python3 -m build reports No module
named build. The script keeps its own .venv-publish instead of touching the
system Python. Credentials are read from ~/.pypirc as usual.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.