Skip to main content

PRSAW, an acronym for `Python Random Stuff API Wrapper`, is a wrapper for the Random Stuff API.

Project description

PRSAW 0.4.0


PRSAW, an acronym for Python Random Stuff API Wrapper, is a wrapper for the Random Stuff API. PyPI:


You can install released versions of prsaw from the Python Package Index with pip or a similar tool:

Stable Release: pip install prsaw
Working Version: pip install git+

Example Usage (No API KEY)

# import the module
from prsaw import RandomStuff

# initiate the object
rs = RandomStuffV2() 

# get a response from an endpoint
response = rs.get_ai_response("How are you?")

# close the object once done (recommended)

Example async usage (With an API key)

# import the module
from prsaw import RandomStuff

# initiate the object with async mode
api_key = "Your API Key"
rs = RandomStuff(async_mode = True, api_key = api_key)

# get a joke
joke = await rs.get_joke()

# close the session
await rs.aclose()


If you've purchased a premium plan you can pass that as a paramater to RandomStuffV3 or RandomStuffV4

plan = "Can be pro/biz/mega/ultra"
rs = RandomStuffV4(api_key = api_key, plan=plan)

Server (V4)

You can specify the server in RandomStuffV4 if you want

server = "Can be primary/backup/unstable"
rs = RandomStuffV4(api_key = api_key, server=server)


You can also pass dev_name, bot_name and ai_language as paramaters to RandomStuffV3 or RandomStuffV4.

Functions available

The current list of asynchronous functions available are:

# endpoints
await get_joke(_type)  # Refer to
await get_image(_type) # for all the endpoints
await get_ai_response(msg)

# others
await aclose() # closes the object

Important Links

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

prsaw-0.4.0.tar.gz (4.8 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