Metadata-Version: 2.4
Name: whiskops-sdk
Version: 0.1.0
Summary: Client SDK for the Whisk device External API (status, turn, stop).
Author: Codemenschen GmbH
License-Expression: MIT
Keywords: whisk,iot,device-control,sdk
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28

# whiskops-sdk (Python)

Client SDK for the Whisk device External API. Wraps bearer-token auth,
idempotency-key generation for `turn`, retry with backoff on 429/5xx, and
client-side spacing between `turn` calls.

## Usage

```python
import os
from whiskops_sdk import WhiskClient

client = WhiskClient(api_key=os.environ["WHISK_API_KEY"])

status = client.status()
if status["online"]:
    client.turn(speed=80)
    client.stop()
```

## Notes

- `turn()` validates `speed` is an integer 1-500 before making a request.
- A 409 response (active Time/Turns session) is not retried — it is raised
  as a `WhiskApiError` since retrying would not resolve the conflict.
- `base_url` defaults to `https://myremotedevice.com/api/v1/external` per the
  published API docs; pass a different one to the constructor if the real
  production host differs.

## Tests

```
python -m venv .venv && .venv/bin/pip install -e . pytest
.venv/bin/pytest
```
