uptimer-python-sdk 1.6.0rc0__tar.gz → 1.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uptimer_python_sdk-1.8.0/.cursor/rules/sdk-docs-implemented-only.mdc +47 -0
- uptimer_python_sdk-1.8.0/AGENTS.md +32 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/CHANGELOG.md +64 -0
- uptimer_python_sdk-1.8.0/PKG-INFO +827 -0
- uptimer_python_sdk-1.8.0/README.md +811 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/Taskfile.yml +13 -2
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/pyproject.toml +14 -2
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/__init__.py +3 -3
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/client.py +11 -3
- uptimer_python_sdk-1.8.0/src/uptimer/endpoints/delivery.py +84 -0
- uptimer_python_sdk-1.8.0/src/uptimer/endpoints/notifications.py +414 -0
- uptimer_python_sdk-1.8.0/src/uptimer/endpoints/subjects.py +645 -0
- uptimer_python_sdk-1.8.0/src/uptimer/endpoints/v1.py +145 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/v2.py +3 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/websites.py +40 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/__init__.py +242 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/acknowledgement.py +99 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/deserialize.py +291 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/maintenance.py +41 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/notifications.py +332 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/rule.py +222 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/signal.py +90 -0
- uptimer_python_sdk-1.8.0/src/uptimer/models/v2/subject.py +76 -0
- uptimer_python_sdk-1.8.0/tests/integrations/test_acknowledgement.py +437 -0
- uptimer_python_sdk-1.8.0/tests/integrations/test_notifications.py +201 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/integrations/test_observations.py +22 -10
- uptimer_python_sdk-1.8.0/tests/integrations/test_signals_rules.py +135 -0
- uptimer_python_sdk-1.8.0/tests/integrations/test_subjects.py +126 -0
- uptimer_python_sdk-1.8.0/tests/test_acknowledgement.py +399 -0
- uptimer_python_sdk-1.8.0/tests/test_alert_delivery_endpoint.py +208 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_client.py +47 -5
- uptimer_python_sdk-1.8.0/tests/test_maintenance.py +271 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_model_namespace.py +82 -0
- uptimer_python_sdk-1.8.0/tests/test_notifications_endpoint.py +353 -0
- uptimer_python_sdk-1.8.0/tests/test_server_contract_v2_notifications.py +150 -0
- uptimer_python_sdk-1.8.0/tests/test_signals_rules_endpoint.py +418 -0
- uptimer_python_sdk-1.8.0/tests/test_subjects_endpoint.py +223 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/uv.lock +1 -1
- uptimer_python_sdk-1.6.0rc0/PKG-INFO +0 -344
- uptimer_python_sdk-1.6.0rc0/README.md +0 -328
- uptimer_python_sdk-1.6.0rc0/src/uptimer/endpoints/subjects.py +0 -154
- uptimer_python_sdk-1.6.0rc0/src/uptimer/models/v2/__init__.py +0 -96
- uptimer_python_sdk-1.6.0rc0/src/uptimer/models/v2/deserialize.py +0 -131
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/.gitignore +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/.pre-commit-config.yaml +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/.vscode/extensions.json +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/.vscode/launch.json +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/.vscode/settings.json +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/.vscode/tasks.json +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/LICENSE +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/NOTICE +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/01_client_setup.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/02_list_workspaces.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/03_list_locations.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/04_create_website_monitor.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/05_open_incidents.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/README.md +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/examples/__init__.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/compat.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/__init__.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/endpoint.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/incidents.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/locations.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/endpoints/workspaces.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/errors.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/http.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/__init__.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/errors.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/v2/incident.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/v2/location.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/v2/monitor.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/v2/observation.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/models/v2/workspace.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/src/uptimer/py.typed +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/__init__.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/conftest.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/integrations/__init__.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/integrations/conftest.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/integrations/test_workspaces.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_endpoint.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_integration_v2.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_observations_endpoint.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_v2_endpoints.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tests/test_workspaces_endpoint.py +0 -0
- {uptimer_python_sdk-1.6.0rc0 → uptimer_python_sdk-1.8.0}/tools/mypy-diff.sh +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: SDK docs describe only what this package implements — no gaps, no roadmap, no release process
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDK docs describe only what this package implements
|
|
7
|
+
|
|
8
|
+
Applies to everything a user of the published package reads: `README.md` (which
|
|
9
|
+
is also the PyPI long description), docstrings under `src/`, and `examples/`.
|
|
10
|
+
|
|
11
|
+
## The rule
|
|
12
|
+
|
|
13
|
+
**Document only capabilities present in this package version.** That is all.
|
|
14
|
+
|
|
15
|
+
A README is a contract for the package somebody just installed, not a status
|
|
16
|
+
board for the work around it.
|
|
17
|
+
|
|
18
|
+
## Do not write
|
|
19
|
+
|
|
20
|
+
- "this SDK does not wrap those routes **yet**", "not implemented", "missing",
|
|
21
|
+
"unsupported" — anything that describes an absence;
|
|
22
|
+
- "not in the published package", "until X is on PyPI", "use a checkout of this
|
|
23
|
+
repository" — release sequencing and workarounds;
|
|
24
|
+
- ticket or issue numbers, internal milestones, or which release something is
|
|
25
|
+
planned for;
|
|
26
|
+
- TODOs or roadmap notes in public docstrings.
|
|
27
|
+
|
|
28
|
+
## Do instead
|
|
29
|
+
|
|
30
|
+
- **Omit it.** A capability this package does not have simply does not appear.
|
|
31
|
+
The reader loses nothing: they cannot call it either way.
|
|
32
|
+
- Where the HTTP API has something the package does not, the
|
|
33
|
+
[REST documentation](https://uptimer.myuptime.info/latest/reference/rest-api/)
|
|
34
|
+
covers it. Link that for the full reference when it helps — without saying
|
|
35
|
+
what is missing here.
|
|
36
|
+
- State the **server** a capability needs when it is not the package minimum
|
|
37
|
+
("needs an Uptimer 1.7.0+ server"). That is a fact about an implemented
|
|
38
|
+
feature, not a gap.
|
|
39
|
+
- When something ships, add it to the docs in the same change that adds the
|
|
40
|
+
code.
|
|
41
|
+
|
|
42
|
+
## Why
|
|
43
|
+
|
|
44
|
+
Users read this to decide what to call. "We have not wrapped that yet" answers a
|
|
45
|
+
question nobody asked and dates the moment it is written; a checkout instruction
|
|
46
|
+
sends somebody around a problem that a later release quietly removed. Both have
|
|
47
|
+
happened here.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AGENTS.md — uptimer-python-sdk
|
|
2
|
+
|
|
3
|
+
The public Python client for Uptimer. Fleet-wide rules apply (see the workspace
|
|
4
|
+
`AGENTS.md`): trunk-based on `main`, no agent attribution, Commitizen subjects.
|
|
5
|
+
|
|
6
|
+
## Documentation policy
|
|
7
|
+
|
|
8
|
+
**SDK docs describe only what this package implements.** That is all.
|
|
9
|
+
|
|
10
|
+
`README.md` (the PyPI long description), the docstrings under `src/`, and
|
|
11
|
+
`examples/` document capabilities present in **this package version**. No "not
|
|
12
|
+
wrapped yet", no checkout workarounds, no ticket numbers, no release
|
|
13
|
+
sequencing. A capability this package does not have is **omitted** — the
|
|
14
|
+
[REST documentation](https://uptimer.myuptime.info/latest/reference/rest-api/)
|
|
15
|
+
covers the HTTP API in full, and may be linked for that.
|
|
16
|
+
|
|
17
|
+
The same rule, in the form Cursor reads:
|
|
18
|
+
[`.cursor/rules/sdk-docs-implemented-only.mdc`](.cursor/rules/sdk-docs-implemented-only.mdc).
|
|
19
|
+
|
|
20
|
+
## Working here
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
task cq # lint + type-check + tests (ruff, mypy, pytest)
|
|
24
|
+
task test # pytest alone
|
|
25
|
+
task build # sdist + wheel into dist/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- The package version tracks the Uptimer release it targets: 1.8.x speaks to
|
|
29
|
+
Uptimer 1.8.0 and later. `uptimer.__version__` is where the compatibility
|
|
30
|
+
minimum comes from, and `cz` bumps it with `pyproject.toml`.
|
|
31
|
+
- **Never publish a prerelease** (rc/a/b/dev) to TestPyPI or PyPI. This package
|
|
32
|
+
ships final `X.Y.Z` only; publishing is an operator action.
|
|
@@ -1,3 +1,67 @@
|
|
|
1
|
+
## 1.8.0 (2026-09-19)
|
|
2
|
+
|
|
3
|
+
Targets Uptimer **1.8.0** and later.
|
|
4
|
+
|
|
5
|
+
### Feat
|
|
6
|
+
|
|
7
|
+
- **notifications**: `client.v2.notifications.destinations` — list, create, get,
|
|
8
|
+
update, delete, plus `set_enabled`, `make_default` and `send_test`. A
|
|
9
|
+
destination is one place a workspace's alerts can go: a Slack incoming
|
|
10
|
+
webhook, or any HTTP endpoint.
|
|
11
|
+
- **notifications**: `client.v2.notifications.transformations` — list, create,
|
|
12
|
+
get, update, delete, plus `samples` (the field vocabulary a template may
|
|
13
|
+
read) and `preview` (the same judgement a save makes, storing nothing). A
|
|
14
|
+
template is stored only once it renders all three messages.
|
|
15
|
+
- **notifications**: `client.v2.notifications.deliveries.all(...)` — the
|
|
16
|
+
delivery log, filtered by destination and by undelivered. Records are kept 30
|
|
17
|
+
days.
|
|
18
|
+
- **delivery**: `client.v2.subjects(slug).delivery` and
|
|
19
|
+
`client.v2.monitoring.websites(id).delivery` — `get`, `replace` and `clear`
|
|
20
|
+
for which destinations one subject tells, and about what. The table is the
|
|
21
|
+
resource: a save replaces it rather than merging.
|
|
22
|
+
- **signals**: `client.v2.subjects(slug).signals` — list, create, get, update
|
|
23
|
+
and delete. Reporting observations to an existing signal is unchanged.
|
|
24
|
+
- **rules**: `client.v2.subjects(slug).rules` — list, create, get, update and
|
|
25
|
+
delete, with typed policy models (`RuleDocument`, `RuleInput`,
|
|
26
|
+
`RuleDecision`, `RuleWait`). A rule input citing another rule is `from_rule`
|
|
27
|
+
in Python, because `from` is a keyword.
|
|
28
|
+
|
|
29
|
+
### Fix
|
|
30
|
+
|
|
31
|
+
- **subjects**: a `workspace_id` given to `client.v2.subjects(slug, ws)` now
|
|
32
|
+
reaches the signal, rule and observation routes under it. Without it, a
|
|
33
|
+
caller holding the same subject slug in two workspaces was answered
|
|
34
|
+
`Ambiguous subject` by the server — by the one call that could have
|
|
35
|
+
disambiguated.
|
|
36
|
+
- **compat**: `uptimer.__version__` is bumped with the package, so the minimum
|
|
37
|
+
server version it derives is the version this package targets. It had
|
|
38
|
+
drifted: 1.7.0 moved `pyproject.toml` alone, and the published client went on
|
|
39
|
+
accepting a 1.6.0 server.
|
|
40
|
+
|
|
41
|
+
### Docs
|
|
42
|
+
|
|
43
|
+
- The README documents only what this package implements, with runnable
|
|
44
|
+
examples for destinations, transformations, subject delivery, the delivery
|
|
45
|
+
log, signals and rules. The complete HTTP API — including anything not
|
|
46
|
+
wrapped here — is at
|
|
47
|
+
<https://uptimer.myuptime.info/latest/reference/rest-api/>.
|
|
48
|
+
- That policy is now written down for contributors and agents in `AGENTS.md`
|
|
49
|
+
and `.cursor/rules/sdk-docs-implemented-only.mdc`.
|
|
50
|
+
|
|
51
|
+
## 1.7.0 (2026-09-14)
|
|
52
|
+
|
|
53
|
+
### Feat
|
|
54
|
+
|
|
55
|
+
- change maintenance end time on Custom subjects
|
|
56
|
+
- subject maintenance window client
|
|
57
|
+
- acknowledge Website and Custom incidents on separate clients
|
|
58
|
+
|
|
59
|
+
## 1.6.0 (2026-09-08)
|
|
60
|
+
|
|
61
|
+
### Feat
|
|
62
|
+
|
|
63
|
+
- **sdk**: list and create Website/Custom subjects
|
|
64
|
+
|
|
1
65
|
## 1.6.0-rc.0 (2026-08-30)
|
|
2
66
|
|
|
3
67
|
### Feat
|