Welcome to YARSAW!

YARSAW is an open source, free and easy to use API Wrapper for the Random Stuff API.

Features

  • Wraps all of the Random Stuff API

  • Asynchronous

  • Easy to use

  • Saves you a lot of time

First Steps

  1. Install the package

python3 -m pip install yarsaw
  1. Register for an account at the Random Stuff API resgistration page.

  2. Import the module nad create an instance of Client

import yarsaw

client = yarsaw.Client("your_api_key")
  1. Use the client to get a random joke (to get familiar with the module)

import yarsaw
import asyncio # builtin, used for asynchronous calls

client = yarsaw.Client("your_api_key")

async def joke():
   joke = await client.get_joke() # get the joke in form of a dict
   formatted_joke = await 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
  1. Start reading the documentation!

Pages

  • Welcome to YARSAW! - The main page of the documentation

  • Client - Explains how to use the client - the main class [Very Important]

  • Utils - Extra support functions for Client’s functions

How to read the documentation

https://gimi-my-beans.reeee.ee/geOe5E.png https://gimi-my-beans.reeee.ee/7d9GQM.png https://gimi-my-beans.reeee.ee/z8rcNM.png