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.0a0.tar.gz
(14.4 kB
view hashes)
Built Distributions
async_pokepy-0.1.0a0-py3.7.egg
(49.9 kB
view hashes)
async_pokepy-0.1.0a0-py3.6.egg
(50.1 kB
view hashes)
async_pokepy-0.1.0a0-py3.5.egg
(50.6 kB
view hashes)
Close
Hashes for async_pokepy-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770a702413df1c6beb2d9f6e73882d87456b0d898bcbc9026a8e7236704b4e05 |
|
MD5 | f54f8192b538d69a3a2c8f2d6d80983b |
|
BLAKE2b-256 | f0d6f349cc86ab32f77eac5d6eb3245a1209872df186014181728c946320ac42 |