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.

Current version: 1.0.1

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

Releases

Releases are automated with GitHub Actions:

  • deploy-docs.yml deploys documentation to GitHub Pages.
  • release-tag-publish.yml deploys docs for the tag, validates the tag version against pyproject.toml, builds distributions, and publishes to PyPI.

Create a release tag (example):

git tag [VERSION] # e.g. git tag v1.0.1
git push origin [VERSION] # e.g. git push origin v1.0.1

For tagged releases, keep CHANGELOG.md updated before pushing the tag.

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
  • docs/releasing.md for release automation and tag flow
  • CHANGELOG.md for release notes

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.1.tar.gz (11.2 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.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sendou_ink_sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sendou_ink_sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 459d67fa9282c025effcf8d533f8bac2454790aed6ef2ca727c9d3a2482f0c30
MD5 07ca42d5a32890ac06b48e958bd2c9d2
BLAKE2b-256 4f60d5ed38e2989add107960d091812c7649c3c26d32ac1d5aed9cb4cfe6d614

See more details on using hashes here.

Provenance

The following attestation bundles were made for sendou_ink_sdk-1.0.1.tar.gz:

Publisher: release-tag-publish.yml on jasonjimnz/sendou_ink_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: sendou_ink_sdk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sendou_ink_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49506cfdc08a248fcf436081b4720e9582ccf849b37b884852bbdbbf5d4097a2
MD5 74369b69b2b04edbc3199e73cb583fcf
BLAKE2b-256 6df2f01c3e4c863bc408a12fcf69631100185622df70d5989b9a5891bd7ebaee

See more details on using hashes here.

Provenance

The following attestation bundles were made for sendou_ink_sdk-1.0.1-py3-none-any.whl:

Publisher: release-tag-publish.yml on jasonjimnz/sendou_ink_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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