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 details)
File details
Details for the file animality-py-0.1.4.tar.gz
.
File metadata
- Download URL: animality-py-0.1.4.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e1cedfc7c672296c06333119215593182513f0214cdb7b5278a80b0fdde87253
|
|
MD5 |
40d6e6c9b70b3c2549623c74c3e92929
|
|
BLAKE2b-256 |
19ea5f658a6b0b6ba161882d9e4f418d2263d4a8a992dbd83977e4ba5e372a00
|