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.1a0.tar.gz
(14.6 kB
view hashes)
Built Distributions
async_pokepy-0.1.1a0-py3.7.egg
(50.1 kB
view hashes)
async_pokepy-0.1.1a0-py3.6.egg
(50.3 kB
view hashes)
async_pokepy-0.1.1a0-py3.5.egg
(50.8 kB
view hashes)
Close
Hashes for async_pokepy-0.1.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32eba929ed5bf64e247df0a9ee143f5285fc45ba8b9aff6a1c2348e9da206054 |
|
MD5 | 123a2e2538038dc77fe3fe17b92b0164 |
|
BLAKE2b-256 | 1f7af0c0b4a9cf44dd8b5481df21cbc35c7eff95b0bb04cf4ae7732c5e276f97 |