An asynchronous API wrapper for the pokeapi.
Project description
AioPokéApi
An Asynchronous API wrapper for the PokéApi.
Report issue · Request feature · Fork project
🗝️ Key Features
- Use of modern Python keywords:
async
andawait
. - Every object is fully type hinted.
- Objects get cached, this increases speed and avoids unnecessary API requests.
🌍 Documentation
AioPokéApi has a very minimal website, which you can find here. It also has some documentation.
☄️ Installation
pip install aiopokeapi
⚙️ Didn't work?
Depending on your Python installation, you might need to use one of the following:
-
Python is not in PATH
path/to/python.exe -m pip install aiopokeapi
-
Python is in PATH but pip is not
python -m pip install aiopokeapi
-
Unix systems can use pip3/python3 commands
pip3 install aiopokeapi
python3 -m pip install aiopokeapi
-
Using multiple Python versions
py -m pip install aiopokeapi
🚀 Getting started
Aiopoke's goal is to be simple and easy to use:
import asyncio
import aiopoke
async def main():
client = aiopoke.AiopokeClient()
ability = await client.get_ability(1)
generation = await ability.generation.fetch()
await client.close()
asyncio.run(main())
Or even better, using a context manager:
# in main()
async with aiopoke.AiopokeClient() as client:
ability = await client.get_ability(1)
generation = await ability.generation.fetch()
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
aiopokeapi-0.1.8.tar.gz
(12.3 MB
view hashes)
Built Distribution
aiopokeapi-0.1.8-py3-none-any.whl
(60.3 kB
view hashes)
Close
Hashes for aiopokeapi-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77a8e425f92607a5071405f83911e0bd0fe0b011db10f449134c1166265ea119 |
|
MD5 | e8262c1ddb51800637ab627b818e2776 |
|
BLAKE2b-256 | ddc4de8bcb9af6604cdcda776d7c3eb7a9bff05c7eab46177f239d3e8dbaa5a2 |