Skip to main content

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.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crashbytes-resilience 1.1.8
File Size Uploaded
crashbytes_resilience-1.1.8.tar.gz 52.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crashbytes-resilience 1.1.8
File Interpreter ABI Platform
crashbytes_resilience-1.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 58.7 kB

Release files / crashbytes_resilience-1.1.8.tar.gz

Download URL crashbytes_resilience-1.1.8.tar.gz
Size 52.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ebf63cf1b6f8d1cfd2ecb572ed50747b4dbfae3020e63af87b434b838f10497a
BLAKE2b-256 checksum
How to use checksums
b65e8bfbd55fc357d54c059c5f420013e92e331553dc7fbadc73aa6552d1d9f5
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 1, 2026.

Transparency log

Release files / crashbytes_resilience-1.1.8-py3-none-any.whl

Download URL crashbytes_resilience-1.1.8-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b04ee2e6b6730846ba8796843ca00d991aeba6058eb95e8e1b9efbf443d65a27
BLAKE2b-256 checksum
How to use checksums
2f5d1122568efb660d3f56a06f0be0931991af79710934d2b3e942c8e41b5b0a
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 1, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.9

2 release files

This release

1.1.8 This release

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page