Unnofficial Python wrapper of the unite-db.com REST API.
Project description
py-unite-db
Unofficial Python wrapper for the unite-db.com REST API.
Introduction
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.
Installation
The package is installable via pip.
pip install py-unite-db
Usage
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']
Contributing
This project uses pdm.
$ pdm install
Running the tests
The project uses pytest.
$ pdm run pytest
Type Checking
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 https://github.com/python/mypy/issues/10633 for more info on this.
Formatting
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
Linting is provided by flake8.
$ pdm run lint
Conventional Commits
The project follows the conventional commit style.
Docs
This project uses mkdocs, mkdocstrings, mkdocs-material for its documentation.
$ pdm run fetch_charm
$ pdm run mkdocs serve
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-unite-db-0.3.0.tar.gz.
File metadata
- Download URL: py-unite-db-0.3.0.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.4 tqdm/4.65.0 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82ddf2ae7baa4838863c2250ef9f1a3140188c341c357ba1da1538b9e25c3880
|
|
| MD5 |
97862f3f76a98d1c2aebda1aef0b20f4
|
|
| BLAKE2b-256 |
dab49d952976482308272c8b77bd0b78320e31ae292c1cad5e9df1c333220886
|
File details
Details for the file py_unite_db-0.3.0-py3-none-any.whl.
File metadata
- Download URL: py_unite_db-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.4 tqdm/4.65.0 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37135dc327cf6d5b230d1c60d1d7f751dd4e9c9e78168ca08a7dd6bc32178257
|
|
| MD5 |
9395a95605570d4c93174e17f753e1ba
|
|
| BLAKE2b-256 |
2f7b6890276be0d3e4a56af63422591a180fd6edc01cfe9b6c0c02ebc72cbfa0
|