Metadata-Version: 2.4
Name: spacelet
Version: 0.0.1a1
Summary: Health client for Spacelet.
Project-URL: Homepage, https://spacelet.ai
Author-email: Spacelet <oss@spacelet.ai>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# Spacelet

Read a Spacelet health endpoint from Python or the command line.

Requires Python 3.11 or later. No runtime dependencies.

```sh
python -m pip install spacelet==0.0.1a1
python -m spacelet health --url https://api.spacelet.ai
```

```python
from spacelet import check_health

result = check_health("https://api.spacelet.ai", timeout=5.0)
print(result.health["status"])
```

The client reads `/health`, preserving a URL path prefix. The default base URL is
`https://api.spacelet.ai`. Responses must be JSON objects with a nonempty `status` string.
`HealthError` exposes `code` and, for HTTP failures, `status_code`.
Requests use a five-second timeout and a 1 MiB response limit; redirects are not followed.

CLI options: `--url`, `--timeout` (seconds), `--json`, `--help`, `--version`.
`SPACELET_URL` sets the CLI base URL. Exit status is 0 for `ok`/`healthy`,
1 for other health states or request failures, and 2 for invalid arguments.

Apache-2.0.
