Skip to main content

An async wrapper for the Random Stuff API

Project description

YARSAW

PyPI - License PyPI - Downloads Documentation Status


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 RapidAPI Key after registering and subscribing to the API here.--

Features

  • Async and fast
  • Object oriented design (Raw outputs are also available)
  • Tons of thigs you can do
    • Get AI Responses (useful for making chatbots)
    • Edit images into memes
    • Gets facts, jokes, images (including aww, meme, etc.)
    • Gets reddit posts - random memes, random posts from subreddits, etc.
  • Simple and easy
  • No need to learn about the Random Stuff API. Just get started with your project
  • Saves time

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.Utils().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

Changes

(2.0)

This is a major change. The Random Stuff API was completely rewritten, and so was this module. Aside from new functions,

  • Docs were updated
    • Uses the ReadTheDocs theme for documentation
    • The documentation is no longer a single page, but a collection of pages.
  • Since the API now has more use of headers than ever (it returns the number of daily requests left), all methods return headers along with other data.
  • The generate_uid and format_joke methods are no longer async - them being async was useless.
  • New Docstrings and comments
  • RawClient was terminated.
  • A lot more updates

Documentation

Read the Documention here

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

yarsaw-2.0.0.tar.gz (10.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page