An async Python library for Sendou.ink
Project description
sendou.py
An async Python client for Sendou.ink
Maintainers
- Vincent Lee
Dependencies
- aiohttp
- aiohttp-client-cache
- python-dateutil
Installation
pip install sendou.py
Supported Endpoints
- Get user
- Get Calendar Entries
- Get Tournament Info
- Get Tournament Teams
- Get Tournament Brackets
- Get Tournament Match Info
Usage
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())
Getting an API Key
To use this library, you must have an API key. You need to DM Sendou for an API Key currently.
Development
For development, you'll need Poetry installed for dependency management and building distributions
Dev Dependencies
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
Testing
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
Tracking Upstream Schema
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.
Upstream Schema Commit SHA checker
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
Update local SHA with Upstream Schema Commit SHA
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
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
File details
Details for the file sendou_py-1.2.8.tar.gz
.
File metadata
- Download URL: sendou_py-1.2.8.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 860e407c56f591cb953b61bfe4fe85e05b74d03263fd0919b1caaa4a681034b3 |
|
MD5 | 3969744956b5fd52d90fda1b1fe134f6 |
|
BLAKE2b-256 | 6bad621d0ff8a2dbd14145ddee4b54ef31d6fcb0747e8a15e215848059e1c555 |
File details
Details for the file sendou_py-1.2.8-py3-none-any.whl
.
File metadata
- Download URL: sendou_py-1.2.8-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7636cf7658f994c7a665de1db2e65a3d214b633e42b7c51986b3372ddd5b7ac9 |
|
MD5 | 2d382fb7a62d7137b24f4cc72efa0440 |
|
BLAKE2b-256 | 0eda1e520b5e471d0dff78febf5696d0310cf7036e6b5828cf17e47423ea0d9f |