Metadata-Version: 2.4
Name: pilot-sdk
Version: 0.2.0
Summary: Python SDK for the Pilot notification relay API
Project-URL: Homepage, https://tools.nexomechanics.com/pilot
License: MIT
License-File: LICENSE
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# Pilot Python SDK

```bash
pip install pilot-sdk
```

## Usage

```python
from pilot_sdk import Pilot

pilot = Pilot("pk_your_api_key")
pilot.send("prod_errors", "Deploy failed on server 3")
```

## Error handling

```python
from pilot_sdk import Pilot, AuthError, RateLimitError, PaymentRequiredError, PilotError

pilot = Pilot("pk_your_api_key")

try:
    pilot.send("prod_errors", "Deploy failed")
except AuthError:
    print("Invalid API key")
except RateLimitError:
    print("Slow down — max 20 msg/sec per destination")
except PaymentRequiredError:
    print("Trial limit reached or subscription cancelled")
except PilotError as e:
    print(f"Error {e.status_code}: {e}")
```
