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 on Windows (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

Run the playground on macOS/Linux (bash/zsh):

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export SENDOU_TOKEN="YOUR_TOKEN"
export SENDOU_USER="sendou"
python playground.py

See docs/playground.md for full platform-specific instructions.

Local testing

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

Run a quick 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/*

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.

Published docs: https://jasonjimnz.github.io/sendou_ink_sdk/

  • 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 Distribution

sendou_ink_sdk-1.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file sendou_ink_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: sendou_ink_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for sendou_ink_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0da080bec3a3590cc792a6aa95241284f5fe21fdf6532e321535c21813c38073
MD5 b86c5a5412403978cc893f7d252896c8
BLAKE2b-256 a881e2cd91d565e23db72310a21530d113dbe7196d4d074850b2831cd4e09d64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sendou_ink_sdk-1.0.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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0e7baaf13817bd04d1e8993a098c450b7862c320487b35134ff655cb5b9d0d5
MD5 a0e731171c357883519489a03969bddf
BLAKE2b-256 d88be2e59d721fcb28ee3b3f8d6152cebe5bc2e1400447a3e57ac1b39ca0df7a

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