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 | Provenance | Actions |
|---|---|---|---|---|
| roastapi_sdk-0.1.0.tar.gz | 4.2 kB | Without provenance | Details for roastapi_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| roastapi_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for roastapi_sdk-0.1.0-py3-none-any.whl |
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
|
Security for roastapi-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.