Python SDK and CLI for RoastAPI — AI-powered roasts as a service
Project description
roastapi-python
Python SDK and CLI for RoastAPI — AI-powered roasts as a service.
Install
pip install roastapi
CLI
# Random roast
roast random
# Roast by category
roast category developer --level brutal --style gordon_ramsay
# Personalised roast
roast me --name Chad --job "10x Engineer" --bio "I move fast and break things"
# Roast a file
roast code main.py
# Roast inline code
roast code --code "for i in range(len(arr)):"
# Pipe code in
cat main.py | roast code
Options
| Flag | Options | Default |
|---|---|---|
--level / -l |
mild medium savage brutal |
savage |
--style / -s |
default gordon_ramsay shakespeare corporate senior_dev |
default |
Example output
Your pull requests have more unresolved comments than a Reddit thread, your
variable names read like a keyboard smash, and somehow you're still surprised
when the build breaks. Here's a tip: git blame yourself.
💥 8.3/10 | savage | gordon_ramsay | developer
SDK
from roastapi import RoastAPI
with RoastAPI() as client:
# Random roast
r = client.roast(level="brutal")
print(r.roast)
print(r.damage_rating) # e.g. 8.3
# Roast by category
r = client.roast_category("developer", style="gordon_ramsay")
# Personalised roast
r = client.roast_me(name="Chad", job="10x Engineer")
# Roast code
r = client.roast_code(open("main.py").read())
print(r) # str(response) returns the roast text
RoastResponse
@dataclass
class RoastResponse:
roast: str
damage_rating: float
level: str
style: str
category: str | None
Environment variables
| Variable | Description |
|---|---|
ROASTAPI_KEY |
API key for paid tiers |
ROASTAPI_URL |
Override base URL (e.g. for local dev) |
export ROASTAPI_URL=http://localhost:8000
roast random
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
roastapi_sdk-0.1.0.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roastapi_sdk-0.1.0.tar.gz.
File metadata
- Download URL: roastapi_sdk-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95304f3eb1b58406bca0175c16f37cc1c8d978b1d32a9d4f9430cdaa0dc408ab
|
|
| MD5 |
0b65ff259721b373651b36c7ccb1991a
|
|
| BLAKE2b-256 |
6bb1455eac6f949d3cdc259f6bc8c56e58c25651d75f157d5c148f493e7bfe2e
|
File details
Details for the file roastapi_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: roastapi_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4b8a1dfe1f34ccf61a35b26b34bc9deebaf3c98532f869fb955e80956f45317
|
|
| MD5 |
6316027ae7c5c489c01b30f9ad5964b0
|
|
| BLAKE2b-256 |
79cd04137a70303ad04a247c85cecdd72a3000a6f079cbd2c27d48472bb59edc
|