Turn HTTP errors into laughter — funny, sarcastic & offensive messages for every status code.
Project description
CodeInsult
Turn errors into laughter. A Python library that maps HTTP status codes to funny, sarcastic, and offensive messages — from "cult reference" to "heavy insult" levels.
English 🇺🇸 | Português 🇧🇷
Installation
pip install codeinsult
Requires Python 3.11 or higher.
Usage
import codeinsult
# Get a message for a status code
print(codeinsult.insult(404))
# "404: O recurso sumiu. Como meias na máquina de lavar."
# With severity level ("light", "medium", "heavy")
print(codeinsult.insult(500, level="heavy"))
# "DEU MERDA NO SERVIDOR! Não foi você, foi a gente. Mas foi você também."
# A completely random message
print(codeinsult.random_insult())
# "418 I'm a Teapot: Sou um bule, não uma cafeteira. Respeita minha profissão!"
# Configure global defaults
codeinsult.set_defaults(lang="pt_br", level="light")
print(codeinsult.insult(401))
# "401 Unauthorized: Você não vai passar! — Gandalf, Servidor Edition."
Severity Levels
| Level | Description | Example |
|---|---|---|
LIGHT |
References to movies, series, books, and memes. No swearing. | "404: Procurei em toda galáxia e não achei. — Baby Yoda." |
MEDIUM |
Sarcasm and irony. Mildly offensive language. | "500: O servidor teve um treco. Tenta de novo quando ele se recuperar." |
HEAVY |
Heavy insults, with explicit swear words and profanity. | "400: QUE REQUEST DE MERDA É ESSE? Nem o Google Tradutor salva essa bagunça!" |
Development
# Clone the repository
git clone https://github.com/Vaz15k/code-insult.git
cd code-insult
# Install dev dependencies
pip install -e ".[dev]"
# Run the tests
pytest tests/ -v
Contributing
Contributions are very welcome! Some ideas:
- 🗣️ Add new languages — Spanish, French, etc.
- 💬 Add more phrases for existing status codes (Be Creative)
- 🐛 Fix bugs or improve documentation
- 📦 New status codes that don't have messages yet
To contribute:
- Fork the project
- Create a branch for your feature
- Add your messages and tests
- Submit a Pull Request
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
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 codeinsult-0.1.0.tar.gz.
File metadata
- Download URL: codeinsult-0.1.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6a3556dab83f2d55474e0a630020c783874f5b67e6c632de1cde25e42a55c6b
|
|
| MD5 |
73847f52bd12901dbb9bcfbb428f6503
|
|
| BLAKE2b-256 |
16f5c1c4620fec5db0130604f5982542264a2757c1b16f6fc95f004ee5ee91b0
|
File details
Details for the file codeinsult-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codeinsult-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52153c71b1726b95b4d5aebba9aa611ec579cca5acc4d2e60dd2a12b43903ff2
|
|
| MD5 |
c66392600e048ff20876ae32cbd05ffe
|
|
| BLAKE2b-256 |
0a85876848c0d95183f29345558005319079095927632d433e9cf67c5145b377
|