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
Metadata
Release files for roastapi-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| roastapi_sdk-0.1.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| roastapi_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / roastapi_sdk-0.1.0.tar.gz
| Download URL | roastapi_sdk-0.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95304f3eb1b58406bca0175c16f37cc1c8d978b1d32a9d4f9430cdaa0dc408ab
|
|
BLAKE2b-256 checksum How to use checksums |
6bb1455eac6f949d3cdc259f6bc8c56e58c25651d75f157d5c148f493e7bfe2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / roastapi_sdk-0.1.0-py3-none-any.whl
| Download URL | roastapi_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4b8a1dfe1f34ccf61a35b26b34bc9deebaf3c98532f869fb955e80956f45317
|
|
BLAKE2b-256 checksum How to use checksums |
79cd04137a70303ad04a247c85cecdd72a3000a6f079cbd2c27d48472bb59edc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|