Skip to content

izxxr/randomstuff.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development Notice

As of April 2023, due to lack of activity and maintanence of Random Stuff API and busy schedule of the maintainer of this package, this package is not being maintained and is not likely to work for the newer (or even older) versions of API.

randomstuff.py

A simple and easy to use, async-ready API wrapper around Random Stuff API.


Features

  • Easy to use, pythonic and Object Oriented interface
  • Implements the entire API
  • Support for both synchronous and asynchronous usage

Installation

Installation can be done easily using the python package manager pip

python -m pip install -U randomstuff.py

To install development (potentially unstable) version:

python -m pip install git+https://github.com/nerdguyahmad/randomstuff.py

Quickstart

Make sure to get the API key from here

Basic Usage

import randomstuff

with randomstuff.Client(api_key='api-key-here') as client:
  response = client.get_ai_response("Hi there")
  print(response.message)

Async Usage

import randomstuf

async with randomstuff.AsyncClient(api_key='api-key-here') as client:
  response = await client.get_ai_response('Hey there')
  print(response.message)

More examples can be found in documentation

Contribution

Feel free to contribute by either opening an issue or a pull request.

See the Contribution Guide for more info.