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.1.3a0.tar.gz
(17.1 kB
view hashes)
Built Distributions
async_pokepy-0.1.3a0-py3.7.egg
(62.0 kB
view hashes)
async_pokepy-0.1.3a0-py3.6.egg
(62.3 kB
view hashes)
async_pokepy-0.1.3a0-py3.5.egg
(62.9 kB
view hashes)
Close
Hashes for async_pokepy-0.1.3a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69aae2c7d0ab408b650ea2ade381cd689fe958951d8ca53e4c5637463e632704 |
|
MD5 | 8771e1e1b1f155db9255888015148d2c |
|
BLAKE2b-256 | bda23e5ab61eeec307244678b6ce6cfcdcb0c777cbd9dcda75261bceaa48b7b0 |