Skip to content

Commit

Permalink
Update readme and export all classes
Browse files Browse the repository at this point in the history
  • Loading branch information
vlee489 committed Jan 29, 2024
1 parent ed286d7 commit 3867466
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 7 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# sendou.py
An async Python client for Sendou.ink

*This package is not written by Sendou.ink's maintainers*
### **This package is a currently a work in progress.**

## Maintainers
- [Inkling Performance Labs](https://iplabs.ink)
- Vincent Lee

## Dependencies
- aiohttp
- python-dateutil

## Installation
`pip install sendou.py`

## Supported Endpoints
- [x] Get user
- [x] Get Tournament Info
- [x] Get Tournament Teams
- [x] Get Tournament Match Info

## Usage
```python
import sendou

client = sendou.Client("API_KEY")
# Get Sendou's user object
await client.get_user("79237403620945920")
```

## Getting an API Key
To use this library, you must have an API key. You need to DM Sendou for an API Key currently.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
[tool.poetry]
name = "sendou-py"
version = "0.1.0"
version = "0.2.0"
description = "An async Python library for Sendou.ink"
authors = ["Vincent Lee <vlee@vlee.me.uk>"]
license = "MIT"
readme = "README.md"
packages = [{include = "sendou"}]

[project.urls]
homepage = "https://github.com/IPLSplatoon/sendou.py/"
repository = "https://github.com/IPLSplatoon/sendou.py/"

[tool.poetry.dependencies]
python = "^3.11"
python = "^3.10"
aiohttp = "^3.9.2"
asyncio = "^3.4.3"
python-dateutil = "^2.8.2"
Expand Down
5 changes: 4 additions & 1 deletion sendou/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
Based off of https://github.com/Sendouc/sendou.ink/blob/rewrite/app/features/api-public/schema.ts#L114
"""
from .tournament import *
from .user import User
from .user import User, UserWeapon, UserSocials
from .badge import Badge
from .plusServer import PlusTiers
from .stageMapList import Stage, ModeShort, StageWithMode

5 changes: 3 additions & 2 deletions sendou/models/tournament/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .tournament import Tournament
from .team import TournamentTeam
from .match import Match
from .tournament import Team as TournamentTeam
from .team import TournamentTeam, TeamMember
from .match import Match, MatchTeam, MapListSourceEnum, MapListMap
10 changes: 10 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from sendou import Client
import asyncio


async def run():
client = Client("2c0980f7bde143658273e77b41148e88")
resp = await client.get_tournament_match("443")
print(resp)

asyncio.run(run())

0 comments on commit 3867466

Please sign in to comment.