Don't just raise exceptions—kill the process. A fail-fast library for laying traps in forbidden code paths.
Project description
Don't just raise exceptions—kill the process.
shortfuse is a zero-tolerance "fail fast" utility for enforcing architectural boundaries. It creates uncatchable traps in deprecated code paths to instantly halt execution and expose regressions.
📚 Documentation
Click here for Full API Docs & Examples
🚀 Quick Start
Installation
pip install shortfuse-lib
The "Loud" Failure
When shortfuse halts, it bypasses try/except blocks and finally handlers by using os._exit(1).
import shortfuse
# 1. Dead Code Trap
shortfuse.halt("Legacy endpoint is dead")
# 2. Conditional Trap
shortfuse.halt_unless(config.v3_enabled, "Must use V3 Config")
# 3. Dependency Trap
shortfuse.halt_if_not_none(legacy_client, "Legacy client must be removed")
For the full visual demonstration of the stack trace, see the Documentation.
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 shortfuse_lib-0.1.0.tar.gz.
File metadata
- Download URL: shortfuse_lib-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
593d13143850eef4f55234d98b142d226c9214270273f2a8a205fd198b204572
|
|
| MD5 |
a66ca68f4a555a366c87651375b2dda1
|
|
| BLAKE2b-256 |
ad0a30987313b71378632ef4b68db993557f901b9fb39f1cf3f00f810291e959
|
File details
Details for the file shortfuse_lib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: shortfuse_lib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad09d1a942dd8a34b7e96ee5d88f8695e011727227c50414e3a73f16255caf77
|
|
| MD5 |
05dc41ecd388c154efa3a738a3e140da
|
|
| BLAKE2b-256 |
e3ab7958ab241dab769b1588e04802ac7a84f04ba28118615c2c37906d814853
|