An async Python client for Sendou.ink
- Vincent Lee
- aiohttp
- aiohttp-client-cache
- python-dateutil
pip install sendou.py
- Get user
- Get Calendar Entries
- Get Tournament Info
- Get Tournament Teams
- Get Tournament Brackets
- Get Tournament Match Info
import sendou
import asyncio
async def run():
client = sendou.Client("API_KEY")
player = await client.get_user("USER_ID")
print(player.name)
asyncio.run(run())
To use this library, you must have an API key. You need to DM Sendou for an API Key currently.
For development, you'll need Poetry installed for dependency management and building distributions
When install dependencies for development run
poetry install --with=dev
In CI you way want to run poetry install --with=dev,ci
that includes CI dependencies for GitHub Actions
This package has some tests, these are written with pytest and can be run with
pytest
You likely need to run poetry install
before executing pytest
This package uses sendou.ink's Public API Schema
file to design the models uses in the package. To keep track of where the package is in relation to the upstream schema,
the commit sha of the upstream schema is kept in the pyproject.toml
file under tool.sendou-py.source
.
There are 2 scripts that help keep this package inline with the upstream schema.
This script uses the GitHub API to check that the SHA stored in tool.sendou-py.source
matches the latest commit for
for the upstream schema.
python3 python3 scripts/checkUpstreamSchema.py
This script pulls down the latest SHA hash for the upstream schema and saves it to the pyproject.toml
file
python3 scripts/updateUpstreamSchema.py
This should only be run after dev has checked their changes match the upstream schema