sendou-py


Namesendou-py JSON
Version 1.2.8 PyPI version JSON
download
home_pagehttps://github.com/IPLSplatoon/sendou.py/
SummaryAn async Python library for Sendou.ink
upload_time2024-10-09 21:22:42
maintainerNone
docs_urlNone
authorVincent Lee
requires_python<4.0,>=3.10
licenseMIT
keywords splatoon sendou.ink
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sendou.py
An async Python client for Sendou.ink

[![Documentation Status](https://readthedocs.org/projects/sendoupy/badge/?version=latest)](https://sendoupy.readthedocs.io/latest/?badge=latest)

- [Documentation](https://sendou.opensource.iplabs.work/)
- [PyPi](https://pypi.org/project/sendou.py/)

## Maintainers
- Vincent Lee

## Dependencies
- aiohttp
- [aiohttp-client-cache](https://pypi.org/project/aiohttp-client-cache/)
- python-dateutil

## Installation
`pip install sendou.py`

## Supported Endpoints
- [x] Get user
- [x] Get Calendar Entries
- [x] Get Tournament Info
  - [x] Get Tournament Teams
  - [X] Get Tournament Brackets
    - [x] Get Tournament Match Info

## Usage
```python
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](https://python-poetry.org) installed for dependency management and building distributions

### Dev Dependencies
When install dependencies for development run

```bash
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

```bash
pytest
```

*You likely need to run `poetry install` before executing pytest*

### Tracking Upstream Schema
This package uses sendou.ink's [Public API Schema](https://github.com/Sendouc/sendou.ink/blob/rewrite/app/features/api-public/schema.ts) 
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.

```bash
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

```bash
python3 scripts/updateUpstreamSchema.py
```

**This should only be run after dev has checked their changes match the upstream schema**
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IPLSplatoon/sendou.py/",
    "name": "sendou-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "splatoon, sendou.ink",
    "author": "Vincent Lee",
    "author_email": "vlee@iplabs.ink",
    "download_url": "https://files.pythonhosted.org/packages/6b/ad/621d0ff8a2dbd14145ddee4b54ef31d6fcb0747e8a15e215848059e1c555/sendou_py-1.2.8.tar.gz",
    "platform": null,
    "description": "# sendou.py\nAn async Python client for Sendou.ink\n\n[![Documentation Status](https://readthedocs.org/projects/sendoupy/badge/?version=latest)](https://sendoupy.readthedocs.io/latest/?badge=latest)\n\n- [Documentation](https://sendou.opensource.iplabs.work/)\n- [PyPi](https://pypi.org/project/sendou.py/)\n\n## Maintainers\n- Vincent Lee\n\n## Dependencies\n- aiohttp\n- [aiohttp-client-cache](https://pypi.org/project/aiohttp-client-cache/)\n- python-dateutil\n\n## Installation\n`pip install sendou.py`\n\n## Supported Endpoints\n- [x] Get user\n- [x] Get Calendar Entries\n- [x] Get Tournament Info\n  - [x] Get Tournament Teams\n  - [X] Get Tournament Brackets\n    - [x] Get Tournament Match Info\n\n## Usage\n```python\nimport sendou\nimport asyncio\n\nasync def run():\n    client = sendou.Client(\"API_KEY\")\n    player = await client.get_user(\"USER_ID\")\n    print(player.name)\n\nasyncio.run(run())\n```\n\n## Getting an API Key\nTo use this library, you must have an API key. You need to DM Sendou for an API Key currently.\n\n## Development\nFor development, you'll need [Poetry](https://python-poetry.org) installed for dependency management and building distributions\n\n### Dev Dependencies\nWhen install dependencies for development run\n\n```bash\npoetry install --with=dev\n```\n\n*In CI you way want to run `poetry install --with=dev,ci` that includes CI dependencies for GitHub Actions*\n\n### Testing\nThis package has *some* tests, these are written with pytest and can be run with\n\n```bash\npytest\n```\n\n*You likely need to run `poetry install` before executing pytest*\n\n### Tracking Upstream Schema\nThis package uses sendou.ink's [Public API Schema](https://github.com/Sendouc/sendou.ink/blob/rewrite/app/features/api-public/schema.ts) \nfile to design the models uses in the package. To keep track of where the package is in relation to the upstream schema, \nthe commit sha of the upstream schema is kept in the `pyproject.toml` file under `tool.sendou-py.source`.\n\nThere are 2 scripts that help keep this package inline with the upstream schema.\n\n#### Upstream Schema Commit SHA checker\nThis script uses the GitHub API to check that the SHA stored in `tool.sendou-py.source` matches the latest commit for \nfor the upstream schema.\n\n```bash\npython3 python3 scripts/checkUpstreamSchema.py\n```\n\n\n#### Update local SHA with Upstream Schema Commit SHA\nThis script pulls down the latest SHA hash for the upstream schema and saves it to the `pyproject.toml` file\n\n```bash\npython3 scripts/updateUpstreamSchema.py\n```\n\n**This should only be run after dev has checked their changes match the upstream schema**",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An async Python library for Sendou.ink",
    "version": "1.2.8",
    "project_urls": {
        "Documentation": "https://sendou.opensource.iplabs.work/",
        "Homepage": "https://github.com/IPLSplatoon/sendou.py/",
        "Repository": "https://github.com/IPLSplatoon/sendou.py/"
    },
    "split_keywords": [
        "splatoon",
        " sendou.ink"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0eda1e520b5e471d0dff78febf5696d0310cf7036e6b5828cf17e47423ea0d9f",
                "md5": "2d382fb7a62d7137b24f4cc72efa0440",
                "sha256": "7636cf7658f994c7a665de1db2e65a3d214b633e42b7c51986b3372ddd5b7ac9"
            },
            "downloads": -1,
            "filename": "sendou_py-1.2.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d382fb7a62d7137b24f4cc72efa0440",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 18605,
            "upload_time": "2024-10-09T21:22:40",
            "upload_time_iso_8601": "2024-10-09T21:22:40.658136Z",
            "url": "https://files.pythonhosted.org/packages/0e/da/1e520b5e471d0dff78febf5696d0310cf7036e6b5828cf17e47423ea0d9f/sendou_py-1.2.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6bad621d0ff8a2dbd14145ddee4b54ef31d6fcb0747e8a15e215848059e1c555",
                "md5": "3969744956b5fd52d90fda1b1fe134f6",
                "sha256": "860e407c56f591cb953b61bfe4fe85e05b74d03263fd0919b1caaa4a681034b3"
            },
            "downloads": -1,
            "filename": "sendou_py-1.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "3969744956b5fd52d90fda1b1fe134f6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 12981,
            "upload_time": "2024-10-09T21:22:42",
            "upload_time_iso_8601": "2024-10-09T21:22:42.249627Z",
            "url": "https://files.pythonhosted.org/packages/6b/ad/621d0ff8a2dbd14145ddee4b54ef31d6fcb0747e8a15e215848059e1c555/sendou_py-1.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 21:22:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IPLSplatoon",
    "github_project": "sendou.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sendou-py"
}
        
Elapsed time: 0.89043s