Human-readable exception explanations in Russian and English with smart suggestions
Project description
Friendly Exceptions 🐍✨
Automatic Python error explanations in simple language
🚀 Quick Start
import friendly_exceptions
# Now all errors are explained automatically!
data = {"name": "Alice"}
print(data["age"]) # Get detailed KeyError explanation
✨ Features
- 🔄 Automatic interception - works immediately after import
- 🌍 2 languages - Russian and English
- 📚 25+ error types - from KeyError to SystemError
- 🧠 Smart suggestions - similar variable and attribute recommendations
- 📖 Documentation links - direct links to Python docs
- ⚙️ Flexible configuration - configure via code or CLI
- 📊 Detailed logging - for debugging and monitoring
🌍 Multi-language Support
import friendly_exceptions
# Russian (default)
friendly_exceptions.set_language("ru")
# English
friendly_exceptions.set_language("en")
📋 Supported Errors
Basic
- KeyError, ValueError, TypeError, AttributeError, IndexError
- FileNotFoundError, ImportError, ZeroDivisionError, NameError
- AssertionError, SyntaxError, IndentationError
System
- OSError, PermissionError, IsADirectoryError
- SystemError, RuntimeError, NotImplementedError
Network
- ConnectionError, TimeoutError
Data
- JSONDecodeError, UnicodeError
Mathematical
- OverflowError, RecursionError, MemoryError
⚙️ Configuration
from friendly_exceptions.config import set_config
# Disable original traceback
set_config("show_original_traceback", False)
# Change language
set_config("language", "en")
🛠️ CLI
# Installation
pip install friendly_exceptions
# Test
friendly-exceptions --test
# Configuration
friendly-exceptions --language en
friendly-exceptions --current-language
📚 Documentation
🤝 Contributing
We welcome contributions! Create Issues and Pull Requests.
📄 License
MIT License
Friendly Exceptions - making Python errors understandable for everyone! 🐍✨
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
friendly_exceptions-0.0.1.tar.gz
(48.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 friendly_exceptions-0.0.1.tar.gz.
File metadata
- Download URL: friendly_exceptions-0.0.1.tar.gz
- Upload date:
- Size: 48.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1ba27142db467498eb04d4e3e0d1a961678382e4318ec88b9f3634080f86db1
|
|
| MD5 |
3a4e2fca4ef931b42fe85d205b64af17
|
|
| BLAKE2b-256 |
c68d8b02cc5163be96ed0916c824c3ffba547e7e396fd0e61b9d922ee281b206
|
File details
Details for the file friendly_exceptions-0.0.1-py3-none-any.whl.
File metadata
- Download URL: friendly_exceptions-0.0.1-py3-none-any.whl
- Upload date:
- Size: 70.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62c70d931b213717ded94efc9c724e7963266355cf2104f94838e18701644eed
|
|
| MD5 |
52f043030a655d6e1c230d5c920abbe6
|
|
| BLAKE2b-256 |
638f2e09411b0e97569dc7b1b5a6c14b11076dc98905367c358a35b89a9a4067
|