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:
SENDOU_TOKEN(API token from https://sendou.ink/api)SENDOU_USER(user ID, Discord ID, or custom URL)
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.ymldeploys documentation to GitHub Pages.release-tag-publish.ymldeploys docs for the tag, validates the tag version againstpyproject.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.mdfor typed endpoint examplesdocs/playground.mdfor local playground instructionsdocs/configuration.mdfor runtime configurationdocs/reference.mdfor method and model referencedocs/releasing.mdfor release automation and tag flowCHANGELOG.mdfor release notes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
459d67fa9282c025effcf8d533f8bac2454790aed6ef2ca727c9d3a2482f0c30
|
|
| MD5 |
07ca42d5a32890ac06b48e958bd2c9d2
|
|
| BLAKE2b-256 |
4f60d5ed38e2989add107960d091812c7649c3c26d32ac1d5aed9cb4cfe6d614
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sendou_ink_sdk-1.0.1.tar.gz -
Subject digest:
459d67fa9282c025effcf8d533f8bac2454790aed6ef2ca727c9d3a2482f0c30 - Sigstore transparency entry: 1149914371
- Sigstore integration time:
-
Permalink:
jasonjimnz/sendou_ink_sdk@cc7ae9238d02b23cadce7e1b6d192fc091ae25b3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/jasonjimnz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-tag-publish.yml@cc7ae9238d02b23cadce7e1b6d192fc091ae25b3 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49506cfdc08a248fcf436081b4720e9582ccf849b37b884852bbdbbf5d4097a2
|
|
| MD5 |
74369b69b2b04edbc3199e73cb583fcf
|
|
| BLAKE2b-256 |
6df2f01c3e4c863bc408a12fcf69631100185622df70d5989b9a5891bd7ebaee
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sendou_ink_sdk-1.0.1-py3-none-any.whl -
Subject digest:
49506cfdc08a248fcf436081b4720e9582ccf849b37b884852bbdbbf5d4097a2 - Sigstore transparency entry: 1149914468
- Sigstore integration time:
-
Permalink:
jasonjimnz/sendou_ink_sdk@cc7ae9238d02b23cadce7e1b6d192fc091ae25b3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/jasonjimnz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-tag-publish.yml@cc7ae9238d02b23cadce7e1b6d192fc091ae25b3 -
Trigger Event:
push
-
Statement type: