Skip to main content

Async Python SDK for the sendou.ink public API.

Project description

Sendou.ink Python SDK

Async Python SDK for the sendou.ink public API.

Installation

pip install sendou-ink-sdk

Quick start

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:

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:

Run the playground:

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

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

Run a quick smoke test against the live API:

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:

mkdocs serve

Build wheel

Create a distributable wheel from source:

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

PowerShell helper script:

./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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sendou_ink_sdk-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file sendou_ink_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sendou_ink_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for sendou_ink_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd40d4deaa9e42f19a5bf46a83aff54d552ff9f4c8a1e6a5ca7d4c5727e5d3fd
MD5 1b444fd9d2f04c9ecbe965a0617994fc
BLAKE2b-256 44f1f5adf626863a031e7d624770b73a82d824d5fde045469621b85694ffe027

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page