Unofficial Python wrapper for the unite-db.com REST API.
unite-db
is a website dedicated to maintaining a database on various stats in the game Pokemon Unite including stats for Pokemon, Battle Items and Held Items.
This wrapper provides a simple, Pythonic interface to those stats via a REST API, with automatic result caching.
Please be warned that this is an unofficial wrapper and the REST API is a private one, so please do not abuse it.
If you are publishing any of the data collected with this API, please give credit to unite-db
. They spend many hours collecting this data.
The package is installable via pip
.
pip install py-unite-db
Import the UniteDb
object:
from py_unite_db import UniteDb
unite_db = UniteDb()
Let's get the names of all supporter Pokemon:
>>> [pokemon.name for pokemon in unite_db.pokemon if pokemon.role == "Supporter"]
['Blissey', 'Eldegoss', 'Mr.Mime', 'Wigglytuff']
This project uses pdm
.
$ pdm install
The project uses pytest
.
$ pdm run pytest
The project must pass mypy
type checking.
$ pdm run typecheck
If you are using mypy
with an IDE like VS Code make sure you have run
$ pdm run stubs
To work around mypy
not supporting PEP582 yet. See python/mypy#10633 for more info on this.
Imports are sorted with isort
and source files are formatted with black
.
$ pdm run format
$ pdm run formatcheck
If you are using VS Code this will be automatically done on save.
Linting is provided by flake8
.
$ pdm run lint
The project follows the conventional commit style.
This project uses mkdocs
, mkdocstrings
, mkdocs-material
for its documentation.
$ pdm run fetch_charm
$ pdm run mkdocs serve