A python API wrapper for https://animality.xyz
Project description
animality-py
Python Wrapper for https://animality.xyz
Discord Server: https://discord.gg/ESPMP7BEeJ
Made for burber. (Hamburger#0001)
Installation
$ pip install animality-py
Simple Usage
import animality
from asyncio import get_event_loop
async def run():
animal = await animality.get("dog")
print(animal.name, animal.image, animal.fact)
random = await animality.random()
print(random.name, random.image, random.fact)
get_event_loop().run_until_complete(run())
Using a session
from animality import AnimalityClient
from asyncio import get_event_loop
async def run():
animality = AnimalityClient()
animal = await animality.get("dog")
print(animal.name, animal.image, animal.fact)
random = await animality.random()
print(random.name, random.image, random.fact)
get_event_loop().run_until_complete(run())
Using the CLI
tip: in most systems, it should also work without the 'python3 -m'.
Get an animal.
$ python3 -m animality cat
Get a random animal.
$ python3 -m animality random
Get multiple animals. (up to 15)
$ python3 -m animality cat dog panda bunny
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
animality-py-0.1.tar.gz
(4.4 kB
view hashes)