python-resilience

Implement exponential backoff with jitter and bounded retries for Python API calls.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Sumeet138/qwen-code-agents --skill python-resilience-sumeet138
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-resilience
Source: https://github.com/Sumeet138/qwen-code-agents/tree/main/plugins/python-development/skills/python-resilience
Command: npx skills add https://github.com/Sumeet138/qwen-code-agents --skill python-resilience-sumeet138

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement robust resilience patterns in Python applications to gracefully handle transient failures, timeouts, and unstable external dependencies.

Core Features & Use Cases

  • Exponential backoff with jitter to avoid thundering herd effects.
  • Timeouts and fault-tolerant decorators to keep services responsive.
  • Patterns for circuit breaking and bounded retries across API clients and background tasks.
  • Use Case: wrap external API calls or database calls to automatically retry on transient errors.

Quick Start

Wrap a network call with the retry decorator to enable automatic retries with backoff.

Frequently Asked Questions about python-resilience

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement exponential backoff with jitter in Python?

Exponential backoff with jitter is implemented in Python by applying fault-tolerant decorators to functions. This pattern spaces out retry attempts with randomized delays, avoiding thundering herd effects when external services recover from transient failures.

What's the best way to retry transient API errors in Python applications?

Retrying transient API errors in Python applications is best handled by wrapping external service calls with fault-tolerant decorators. These automatically catch intermittent failures and apply bounded retries with exponential backoff to maintain responsiveness.

Can I use Tenacity and httpx to add timeouts and retries to external service calls?

Tenacity and httpx can be used to add timeouts and bounded retries to external service calls. This Skill provides fault-tolerant decorators that integrate both libraries to keep API clients and background tasks responsive during transient failures.

Why do my Python background tasks fail when external dependencies time out intermittently?

Python background tasks fail on intermittent external dependency timeouts because they lack resilience patterns. Implementing bounded retries with exponential backoff and timeout decorators ensures tasks gracefully handle transient failures instead of crashing.

When do I need circuit breaking and bounded retries for Python API clients?

Circuit breaking and bounded retries are needed for Python API clients when external dependencies experience intermittent errors or timeouts. These fault-tolerance patterns prevent cascading failures by limiting retry attempts and keeping services responsive.

Does implementing fault-tolerant decorators in Python require any external dependencies?

Implementing fault-tolerant decorators in Python does not require external dependencies beyond Tenacity and httpx. The Skill applies these libraries to handle timeouts, exponential backoff with jitter, and bounded retries for external service calls.