An async wrapper for the Random Stuff API
Project description
YARSAW
YARSAW (Yet Another Random Stuff API Wrapper) is an Async, Object Oriented and Modern Python API Wrapper for the Random Stuff API. This module makes it simpler for you to interact with the API and is easy to implement into your application.
Make sure to get Random Stuff API Key from here and a RapidAPI Application Key after registering and subscribing to the API here.
Features
- Tons of things you can do
- Get AI Responses (useful for chatbots!)
- Get Anime GIFs and Waifu Images
- Get Animal images
- Get memes from various subreddits, and even create memes with pre-built templates!
- Get jokes and fun facts
- And so much more!
- Object-oriented design. YARSAW takes inspiration from randomstuff.py and sends you the data from the API in form of objects instead of plain JSON.
- Async-ready. YARSAW provides an async client for async enviorments using aiohttp.
- Easy to use. YARSAW is well-documented, and has utility features to help you with your requests.
- Saves your time. i) No need to learn about the API itself and its complicated design. ii) No need to enter the credentials again and again. Enter it once, and get coding. YARSAW will take care of the boring stuff for you. iii) No need to handle the unhelpful errors given by requests/aiohttp/RapidAPI. Get human-headable, descriptive and helpful error messages. iv) Common errors and issues are prevented and declared before runtime.
Examples
import yarsaw
import asyncio
client = yarsaw.Client("RSA Key", "RapidAPI Key")
async def joke():
joke = await client.get_joke() # get the joke
formatted_joke = yarsaw.format_joke(joke) # format the joke (optional)
print(formatted_joke) # print the joke
asyncio.get_event_loop().run_until_complete(joke()) # run the joke() function
Installation
python3 -m pip install yarsaw
Links
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
yarsaw-2.1.0.tar.gz
(10.4 kB
view details)
Built Distribution
yarsaw-2.1.0-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file yarsaw-2.1.0.tar.gz
.
File metadata
- Download URL: yarsaw-2.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 170e67c64d7490cccf32635ce2a85b3502ea8fbb99b2d0a4294333035354b49d |
|
MD5 | aea554b310133733caeabe5a27f3ecdd |
|
BLAKE2b-256 | ac83f852ba659a8a4af977b32814586ce11434eccafdf4529bc2cb584f7a335c |
File details
Details for the file yarsaw-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: yarsaw-2.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f12dbd8e6fed1e1cb8f34541ef8ae995b5496eed18ab53809f08ffe5178398a |
|
MD5 | 32779de62826c31f8f12af7d3192c211 |
|
BLAKE2b-256 | 86daa6145434f89db9caf5ef6d495795459fb084dbdcd04ddb03e593b4e3105a |