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
Built Distribution
File details
Details for the file aiopokeapi-0.1.9.tar.gz
.
File metadata
- Download URL: aiopokeapi-0.1.9.tar.gz
- Upload date:
- Size: 12.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5773c28b15d52d2fba5da98977b28309e6456028a9a2f34dc717ce4ffdbc81c |
|
MD5 | 3f8c25606f5a14f3e3559268319836e0 |
|
BLAKE2b-256 | 327200b04dc1fd51f3d90c3b76d8f362de2a5144c3cc941bf35f8926baaa3e19 |
File details
Details for the file aiopokeapi-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: aiopokeapi-0.1.9-py3-none-any.whl
- Upload date:
- Size: 60.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 399c34280425cbafb263f4c6c1bf04740c6afe5533671b4d47867f305305c6c9 |
|
MD5 | 5dfeddfc9e89dbba8ccec85895ba12a1 |
|
BLAKE2b-256 | de473a961ef552b9647a4a2fb53c3b95d5daf145e5f3f37bd02b137b83e264cb |