Metadata-Version: 2.4
Name: syschecks
Version: 0.1.0a2
Summary: Official Python SDK for the Syschecks API
Project-URL: Homepage, https://syschecks.com
Project-URL: Source, https://github.com/systeampl/syschecks-python
Project-URL: Issues, https://github.com/systeampl/syschecks-python/issues
Project-URL: Changelog, https://github.com/systeampl/syschecks-python/blob/main/CHANGELOG.md
Author: SysTeam
License-Expression: MIT
License-File: LICENSE
Keywords: healthchecks,incidents,monitoring,oncall,sdk,syschecks
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
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

[![PyPI version](https://img.shields.io/pypi/v/syschecks.svg)](https://pypi.org/project/syschecks/)
[![Python versions](https://img.shields.io/pypi/pyversions/syschecks.svg)](https://pypi.org/project/syschecks/)
[![License: MIT](https://img.shields.io/pypi/l/syschecks.svg)](https://github.com/systeampl/syschecks-python/blob/main/LICENSE)

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

```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_...")

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 with autocomplete.

### Async

```python
from syschecks import AsyncSyschecksClient

async with AsyncSyschecksClient(base_url="https://api.syschecks.com", token="sk_...") as sc:
    checks = await sc.checks.list_checks()
```

### Errors

Unexpected HTTP statuses raise `SyschecksError`:

```python
from syschecks import SyschecksError

try:
    sc.checks.get_check_details(check_id=999999)
except SyschecksError as exc:
    print(exc.status_code)
```

Pass `raise_on_unexpected_status=False` to opt out, or `timeout=` / `httpx_args=`
to tune the underlying transport.

## 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` / `AsyncChecks`, …), generated
  by `scripts/gen_facade.py`, each method delegating to the core with `client` injected.
- `syschecks/client.py` — `SyschecksClient` / `AsyncSyschecksClient`, wiring the namespaces.
- `syschecks/models.py` — the public request/response model surface.

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
```

## Stability

`0.x` releases are alpha: the surface may change before `1.0`. Streaming (SSE)
endpoints are not yet exposed, and a few endpoints return a raw `Response` until
their schemas are finalized.

## Development

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