Metadata-Version: 2.4
Name: botseon
Version: 0.0.1
Summary: Python client and command-line tool for the Botseon API, used with a personal API key.
License-Expression: Apache-2.0
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# botseon (Python SDK)

The Python client and `botseon-task` command for the Botseon API, used with your personal API key
(Settings > API keys). Standard library only; Python 3.9 or later.

```bash
pip install botseon
```

```python
from botseon import Client

client = Client()  # BOTSEON_API_URL, BOTSEON_API_KEY

for bot in client.list_bots():
    print(bot.id, bot.name)

result = client.run_task("Draft the release notes.", bot_name="Inbox Triage")
print(result.outcome, result.text)
```

The calls mirror the TypeScript SDK (`packages/sdk`): `run_task`, `send_task`, `get_run`,
`wait_for_run`, `get_result`, `cancel_run`, `resolve_bot`, `list_bots`. Every failure is a
`BotseonError` subclass, one per code (`NotFoundError`, `ConflictError`, `TaskTimeoutError`, …).

```bash
BOTSEON_API_KEY=... botseon-task --bot "Inbox Triage" --json -- Draft the release notes.
BOTSEON_API_KEY=... botseon-task --list-bots
```

## Tests

`tests/` runs against the fake API from `@botseon/sdk/test/fake-api`. In this repository
`pnpm --filter @botseon/sdk test` builds the fake and runs `python3 -m unittest discover -s tests`
with the client's `transport` seam piped to it (`packages/sdk/src/python-sdk.e2e.test.ts`). Run on
its own, without `BOTSEON_FAKE_API`, the end-to-end module skips.

## Publishing

`python3 -m build sdk/python` then `twine upload dist/*` (needs a PyPI token).
