Prsaw
PRSAW, an acronym for "Python Random Stuff API Wrapper", is a wrapper for the Random Stuff API.
Install / Use
/learn @CodeWithSwastik/PrsawREADME
PRSAW 0.4.0
PRSAW, an acronym for Python Random Stuff API Wrapper, is a wrapper for the Random Stuff API.
PyPI: https://pypi.org/project/prsaw/
Installation
You can install released versions of prsaw from the Python Package Index with pip or a similar tool:
Stable Release: pip install prsaw<br>
Working Version: pip install git+https://github.com/CodeWithSwastik/prsaw.git
Example Usage (No API KEY)
# import the module
from prsaw import RandomStuffV2
# initiate the object
rs = RandomStuffV2()
# get a response from an endpoint
response = rs.get_ai_response("How are you?")
print(response)
# close the object once done (recommended)
rs.close()
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()
print(joke)
# close the session
await rs.aclose()
Plans
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)
Misc
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 https://api.pgamerx.com/endpoints
await get_image(_type) # for all the endpoints
await get_ai_response(msg)
# others
await aclose() # closes the object
Important Links
- Register API key - Click Here
- Documentation/Endpoints - Click Here
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
351.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
