Makes Python literally uncrashable.
I got tired of writing try/except blocks everywhere. So I made a decorator that catches EVERYTHING.
pip install unbreakablecode
from unbreakablecode import self_healing
@self_healing
def dangerous_function():
return 1/0 # This won't crash anymore
result = dangerous_function() # Returns None instead of exploding
- Decorator catches ALL exceptions
- Queries fixitAPI.dev for known solutions
- Falls back to pattern matching
- Returns None as last resort
- Your code keeps running no matter what
Version 2.0.0 crashed on import due to Unicode errors. The "unbreakable" package broke itself. Version 2.0.1 fixes this.
This should absolutely not be used in production. You will use it in production anyway.
- Built in 30 days while learning Python
- Prevents 100% of crashes
- Probably cursed
- Definitely works
MIT - Because error handling should be free
Built with spite and milk crates by Talon