Metadata-Version: 2.4
Name: theseeker-status
Version: 0.1.0
Summary: Python SDK for reporting TheSeeker status events.
Author: TheSeeker
License: MIT License
        
        Copyright (c) 2026 TheSeeker
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://theseeker.io
Project-URL: Repository, https://github.com/theseeker/theseeker
Keywords: theseeker,status,monitoring,hmac
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
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 :: Internet :: WWW/HTTP
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# theseeker-status

Python SDK for sending signed status events to TheSeeker ingest.

## Install

```bash
pip install theseeker-status
```

## Usage

```python
import os

from theseeker_status import RESULT_OK, create_status_client

status = create_status_client(
    key_id=os.environ["THESEEKER_INGEST_KEY_ID"],
    secret=os.environ["THESEEKER_INGEST_SECRET"],
    endpoint="https://ingest.theseeker.io",
    slug="homepage",
)

status.report(
    RESULT_OK,
    latency_ms=123,
    message="homepage responded normally",
    metrics={"dnsMs": 12, "tlsMs": 30},
)
```

`endpoint` can be either the full events URL (`https://ingest.theseeker.io/v1/events`) or the base URL (`https://ingest.theseeker.io`). Base URLs are sent to `/v1/events` automatically.

If a client-level slug is not configured, pass it per report:

```python
status = create_status_client(
    key_id=os.environ["THESEEKER_INGEST_KEY_ID"],
    secret=os.environ["THESEEKER_INGEST_SECRET"],
    endpoint="https://ingest.theseeker.io/v1/events",
)

status.report("degraded", latency_ms=950, slug="checkout-api")
```

## Event shape

The SDK sends a single top-level event:

```json
{"slug":"homepage","result":"ok","latencyMs":123,"message":"homepage responded normally","metrics":{"dnsMs":12}}
```

Valid results are `ok`, `degraded`, and `down`.

## Signing

Requests include `X-Ingest-Key-Id`, `X-Timestamp`, `X-Nonce`, and `X-Signature`. The signed payload is:

```text
METHOD.upper() + PATH + TIMESTAMP + NONCE + sha256_hex(body_bytes)
```

The same compact JSON bytes are used for signing and transmission.
