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.2a0.tar.gz
(15.5 kB
view hashes)
Built Distributions
async_pokepy-0.1.2a0-py3.7.egg
(55.5 kB
view hashes)
async_pokepy-0.1.2a0-py3.6.egg
(55.9 kB
view hashes)
async_pokepy-0.1.2a0-py3.5.egg
(56.4 kB
view hashes)
Close
Hashes for async_pokepy-0.1.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e10a482d2add6f3716f73e0d293ed10df199d0a5f6a5ecae1372886d83ca2024 |
|
MD5 | 23e83e5af87b4e9751d0834cfacdafaf |
|
BLAKE2b-256 | 760596ecc89469ce1f37fc9c9b19d8a7a4577a032a950043f793e4a0a24c84c1 |