pico-resilience¶
Part of an ecosystem built for the AI era: machine-readable conventions in every repo, installable AI coding skills, and scaffolds that generate AI-maintainable projects.
Spring-style resilience annotations over pico-ioc method interception, auto-discovered by pico-boot. Zero-config.
| Decorator | Policy |
|---|---|
@retryable | Exponential-backoff retry (sync + async) |
@circuit_breaker | Per-method circuit: closed → open → half-open |
@timeout | Async time budget via asyncio.timeout |
30-second example¶
from pico_ioc import component
from pico_resilience import retryable, circuit_breaker
@component
class PaymentGateway:
@retryable(max_attempts=3, backoff_seconds=0.2, retry_on=(ConnectionError,))
@circuit_breaker(failure_threshold=5, reset_timeout_seconds=30)
def charge(self, order): ...
Continue with Getting Started.