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.
- Easy to use, pythonic and Object Oriented interface
- Implements the entire API
- Support for both synchronous and asynchronous usage
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
Make sure to get the API key from here
import randomstuff
with randomstuff.Client(api_key='api-key-here') as client:
response = client.get_ai_response("Hi there")
print(response.message)
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
Feel free to contribute by either opening an issue or a pull request.
See the Contribution Guide for more info.