Metadata-Version: 2.4
Name: sendou-ink-sdk
Version: 0.1.0
Summary: Async Python SDK for the sendou.ink public API.
Author: Sendou Ink SDK Contributors
License-Expression: MIT
Project-URL: Homepage, https://sendou.ink
Project-URL: Repository, https://github.com/your-org/sendou-ink-sdk
Project-URL: Documentation, https://your-org.github.io/sendou-ink-sdk
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Provides-Extra: build
Requires-Dist: build>=1.2; extra == "build"
Requires-Dist: twine>=5.0; extra == "build"
Dynamic: license-file

# Sendou.ink Python SDK

Async Python SDK for the sendou.ink public API.

## Installation

```bash
pip install sendou-ink-sdk
```

## Quick start

```python
import asyncio
from sendou_sdk import SendouClient

async def main() -> None:
    async with SendouClient(token="YOUR_TOKEN") as client:
        user = await client.users.get("sendou")
        print(user.name, user.country)

asyncio.run(main())
```

## Data types

The SDK returns typed Pydantic models. You can add type hints directly in your scripts:

```python
from sendou_sdk import GetUserResponse, GetUserIdsResponse, GetTeamResponse

user: GetUserResponse = await client.users.get("sendou")
user_ids: GetUserIdsResponse = await client.users.get_ids("sendou")
team: GetTeamResponse = await client.teams.get(4)
```

Most commonly used response and request models are exported from `sendou_sdk`.

## Playground

Use `playground.py` to quickly inspect live API responses with your own token and user identifier.

Required environment variables:

- `SENDOU_TOKEN` (API token from https://sendou.ink/api)
- `SENDOU_USER` (user ID, Discord ID, or custom URL)

Run the playground:

```powershell
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
$env:SENDOU_TOKEN="YOUR_TOKEN"
$env:SENDOU_USER="sendou"
python playground.py
```

See `docs/playground.md` for a fuller walkthrough.

## Local testing

```bash
python -m venv .venv
.venv\\Scripts\\activate
pip install -r requirements.txt
```

Run a quick smoke test against the live API:

```python
import asyncio
from sendou_sdk import SendouClient

async def main() -> None:
    async with SendouClient(token="YOUR_TOKEN") as client:
        user = await client.users.get("sendou")
        print(user.name, user.country)

asyncio.run(main())
```

Build and preview docs locally:

```bash
mkdocs serve
```

## Build wheel

Create a distributable wheel from source:

```powershell
python -m pip install -e ".[build]"
python -m build --wheel
python -m twine check dist/*
```

PowerShell helper script:

```powershell
./scripts/build-wheel.ps1
```

## Features

- Async-first client built on httpx
- Typed response models powered by Pydantic
- Token-based authentication handling
- Explicit API error types

## Documentation

Full documentation lives in `docs/` and can be published with MkDocs.

- `docs/usage.md` for typed endpoint examples
- `docs/playground.md` for local playground instructions
- `docs/configuration.md` for runtime configuration
- `docs/reference.md` for method and model reference

