crashbytes-resilience
Unified resilience patterns for Python — retry, circuit breaker, rate limiter, timeout, bulkhead, fallback. Zero dependencies. Sync + async. Thread-safe.
Install
pip install crashbytes-resilience
Usage
from crashbytes_resilience import retry, circuit_breaker, timeout, fallback, pipeline
@retry(max_attempts=3, delay=0.5, backoff=2.0)
def fetch_data():
...
@circuit_breaker(failure_threshold=5, recovery_timeout=30)
def call_service():
...
@timeout(5.0)
async def slow_operation():
...
@fallback(lambda: {"cached": True})
def get_config():
...
# Compose patterns
@pipeline(retry(max_attempts=3, delay=0.1), timeout(5.0), fallback(lambda: None))
def resilient_call():
...
Patterns
| Decorator | Description |
|---|---|
@retry() |
Retry with exponential backoff |
@circuit_breaker() |
Stop calling failing services |
@rate_limiter() |
Token-bucket rate limiting |
@timeout() |
Time-limit operations |
@bulkhead() |
Limit concurrent executions |
@fallback() |
Provide fallback on failure |
@pipeline() |
Compose multiple patterns |
All patterns work with both sync and async functions.
License
MIT
Metadata
Release files for crashbytes-resilience 1.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crashbytes_resilience-1.1.9.tar.gz | 52.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crashbytes_resilience-1.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.7 kB
Release files / crashbytes_resilience-1.1.9.tar.gz
| Download URL | crashbytes_resilience-1.1.9.tar.gz |
|---|---|
| Size | 52.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1baea1d0c0a27ae21c9038973b2a3bfbe11be8be70ce4b8a218fed46767bbe6
|
|
BLAKE2b-256 checksum How to use checksums |
e7f8a5b4153c78366f67a56345cbaec7e4d952b9aaa26596ea3fed871775d31e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / crashbytes_resilience-1.1.9-py3-none-any.whl
| Download URL | crashbytes_resilience-1.1.9-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce5a9476c5e9dcb6eb250533690935ebacfd9ba34decdffd5bdb8366009384f0
|
|
BLAKE2b-256 checksum How to use checksums |
2c57a9922879763de5d4c4ced324584c15fe2f40c1f637fb8af7ab8ebe798572
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log