Metadata-Version: 2.4
Name: syschecks
Version: 0.1.0a1
Summary: Official Python SDK for the Syschecks API
Project-URL: Homepage, https://syschecks.com
Project-URL: Source, https://github.com/systeampl/syschecks-python
Author: SysTeam
License-Expression: MIT
License-File: LICENSE
Keywords: healthchecks,monitoring,oncall,sdk,syschecks
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: attrs>=22.2.0
Requires-Dist: httpx<0.29,>=0.23
Requires-Dist: python-dateutil>=2.8.0
Description-Content-Type: text/markdown

# syschecks — Python SDK

Official Python client for the [Syschecks](https://syschecks.com) API — monitoring,
incidents, on-call, status pages, playbooks and more.

```bash
pip install syschecks
```

## Usage

```python
from syschecks import SyschecksClient
from syschecks.models import CheckCreate

sc = SyschecksClient(base_url="https://api.syschecks.com", token="sk_...")

# fluent, typed, autocompleted — one client, resource namespaces
checks = sc.checks.list_checks()
check = sc.checks.create_new_check(body=CheckCreate(name="api-prod", ...))
sc.incidents.list_incidents()
sc.oncall.get_schedule(schedule_id=3)
sc.playbooks.create_playbook(org_id=1, body=...)
```

Every endpoint is a method on its resource namespace (`sc.<resource>.<operation>()`),
mirroring Stripe / Anthropic-style SDKs. Path parameters are positional, request
bodies and query filters are keyword arguments — all fully typed.

## Architecture

This SDK is **generated** from the curated OpenAPI spec (the source of truth):

- `syschecks/_sdk/` — typed HTTP core + models, produced by
  [`openapi-python-client`](https://github.com/openapi-generators/openapi-python-client).
- `syschecks/resources/` — the fluent facade (`Checks`, `Incidents`, …), generated
  by `scripts/gen_facade.py`, each method delegating to the core with `client` injected.
- `syschecks/client.py` — `SyschecksClient`, wiring the namespaces together.

Nothing under `syschecks/` is hand-edited. Regenerate after a spec change:

```bash
./scripts/generate.sh            # uses ../syschecks-openapi/syschecks-openapi.json
./scripts/generate.sh path/to/spec.json
```

## Known gaps

- **SSE streams** (`events.event_stream`, `sse_metrics`, `sse_stats`) are omitted —
  streaming is out of scope for v1.
- A handful of endpoints whose backend routes lack a `response_model` return a raw
  `Response[Any]` (e.g. `cloud_status.list_cloud_statuses`, `checks.get_slo_summary`)
  until the backend annotates them.

## Development

```bash
python -m pytest tests/       # structural smoke tests (no network)
```
