
python-resilience
Python resilience patterns including automatic retries, exponential backoff
by wshobsonFree
Description
python-resilience is an agent skill from the wshobson/agents collection for building Python applications that keep working when their dependencies are unreliable. It covers automatic retries with exponential backoff, where each retry waits longer than the last, timeouts for network operations, and fault-tolerant decorators that wrap calls to outside services. The first core idea is to tell transient failures from permanent ones: retry temporary problems such as network timeouts and brief service outages, and do not retry permanent errors such as invalid credentials or malformed requests, which will fail every time. The skill also covers handling rate limits and backpressure, so an application slows down instead of overwhelming the service it depends on, and designing circuit breakers that stop calls to a service that keeps failing and let it recover. It applies when adding retry logic to external service calls, implementing timeouts for network operations, building fault-tolerant microservices, handling rate limiting and backpressure, creating infrastructure decorators, and designing circuit breakers. Retries can make an outage worse if they are not bounded, so the skill's guidance sets limits and waits. The agent applies these patterns to the calls in the code it works on, and the team checks the chosen limits against its own service levels. The skill is installed with the skills CLI from the wshobson/agents repository. Its skills.sh page showed about 11.5K installs and passing results from three security audits at the time of the scan.…
Highlights
- Retries with exponential backoff
- Timeouts for network operations
- Transient versus permanent failure handling
- Rate limiting and backpressure
- Circuit breakers and fault-tolerant decorators
- Installs with the skills CLI
Ratings & Reviews
No ratings yet
Be the first to rate python-resilience.
People also visit
python-resilience FAQ
What is exponential backoff?
Waiting longer between each retry, so a struggling service gets room to recover.
Which errors should be retried?
Transient failures such as network timeouts and temporary service problems. Permanent errors such as invalid credentials or bad requests are not retried.
What is a circuit breaker?
A pattern that stops calls to a service that keeps failing, and lets it recover before calls resume.
Can retries cause problems?
They can make an outage worse if unbounded, so the skill's guidance sets limits and waits.
How do I install it?
Run npx skills add https://github.com/wshobson/agents --skill python-resilience.
What security audits does it have?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.
What are the best python-resilience alternatives?
Popular alternatives to python-resilience include airflow-dag-patterns, async-python-patterns and backtesting-frameworks. See all python-resilience alternatives
