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

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.6
File Size Uploaded
crashbytes_resilience-1.1.6.tar.gz 42.8 kB Details

Built distribution (wheel)

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

Total release size: 48.7 kB

Release files / crashbytes_resilience-1.1.6.tar.gz

Download URL crashbytes_resilience-1.1.6.tar.gz
Size 42.8 kB
Tags Source
SHA-256 checksum
How to use checksums
86fbe70358625abbb08f12bf61a23eba18bdc9c8e877edbed005520acfeeb46e
BLAKE2b-256 checksum
How to use checksums
62f5a8d4df4fa7dbfa80defde9604f094045d3d01ddd71865bbb181c6c23fd95
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 Aug 1, 2026.

Transparency log

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

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

Transparency log

Release history Release notifications | RSS feed

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

This release

1.1.6 This release

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