A simple asynchronous wrapper for the PokeAPI.co API.
Project description
async_pokepy
An, in the works, asynchronous wrapper for the PokeAPI.co API.
You can check out the (failing) pipelines @ gitlab.
Documentation
The docs are available @ readthedocs.
Installing
The wrapper is available on PyPi, you can install it with:
pip install async_pokepy
Example
import asyncio
import async_pokepy
async def main(query):
client = await async_pokepy.Client.connect()
pokemon = await client.get_pokemon(query)
fmt = " ".join(map(str, pokemon.abilities))
print("{0} has the abilities {1}".format(pokemon, fmt))
await client.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(main("Snorlax"))
This will output: "snorlax has the abilities gluttony thick-fat immunity"
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
async_pokepy-0.0.7a0.tar.gz
(8.8 kB
view hashes)
Built Distributions
async_pokepy-0.0.7a0-py3.7.egg
(31.4 kB
view hashes)
Close
Hashes for async_pokepy-0.0.7a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a669eddaf09c0a34520dcf56183391ef5a3931e403906dff6329a06b61dcb1 |
|
MD5 | a8213df92b13cc80592bd792ebb45093 |
|
BLAKE2b-256 | 33547f209d970a10347f41e76850fe58f765ac8f9928ceb79a0ae2a97f92cd3b |