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

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.7
File Size Uploaded
crashbytes_resilience-1.1.7.tar.gz 52.7 kB Details

Built distribution (wheel)

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

Total release size: 58.6 kB

Release files / crashbytes_resilience-1.1.7.tar.gz

Download URL crashbytes_resilience-1.1.7.tar.gz
Size 52.7 kB
Tags Source
SHA-256 checksum
How to use checksums
96c1a288d3fcdd76b01b9b3821bce5d2543be4d0647438ff56ff993a474ab1b5
BLAKE2b-256 checksum
How to use checksums
74b9abbc00ac045e87ee740aa48e1aade99c7e057adc505e0319c727588baa80
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 15, 2026.

Transparency log

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

Download URL crashbytes_resilience-1.1.7-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d2e73dd87760cf628bee4dd474633919b20b95a7ea35bbcfbfb3ae1ea400651
BLAKE2b-256 checksum
How to use checksums
4364dd64f6c01f0cf3bcd39e740281b597fae3c5f5d0d8483bc9f5292db3515c
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 15, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.9

2 release files

1.1.8

2 release files

This release

1.1.7 This release

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