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)
await animality.close()
get_event_loop().run_until_complete(run())
Using the CLI
Get an animal.
$ animality cat
Get a random animal.
$ animality random
Get multiple animals. (up to 15)
$ 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.4.tar.gz
(4.7 kB
view hashes)