python-resilience

Add retry, timeout, and fault-tolerance decorators to Python applications.

2|2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/NorkzYT/claude-code-autopilot --skill python-resilience
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-resilience
Source: https://github.com/NorkzYT/claude-code-autopilot/tree/main/.claude/skills/python-resilience
Command: npx skills add https://github.com/NorkzYT/claude-code-autopilot --skill python-resilience

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python applications often face transient failures (network glitches, timeouts, flaky services). This Skill provides a structured approach to adding retries, backoff, timeouts, and fault-tolerant decorators to keep systems resilient.

Core Features & Use Cases

  • Exponential backoff with jitter to mitigate retry storms
  • Timeout handling and optional circuit-breaker patterns for fault-tolerant services
  • Decorator-based composition to separate resilience concerns from business logic

Quick Start

Install the tenacity library and wrap a function with a retry decorator to handle transient failures.

Frequently Asked Questions about python-resilience

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

FAQPage Schema
How do I add retry logic to Python API calls?▼

Exponential backoff mitigates retry storms by progressively increasing the delay between retry attempts. Adding jitter randomizes these delay intervals, preventing synchronized retry surges when a recovering service comes back online.

How do I handle timeouts in long-running Python tasks?▼

Yes, you can use decorator-based composition to add timeout handling and optional circuit-breaker patterns. This builds fault-tolerant services by separating resilience logic from core business functions.

Do I need the tenacity library to implement exponential backoff in Python?▼

Yes, you need to install the tenacity library to implement exponential backoff with jitter. The Skill provides tenacity-compatible decorators to ensure structured retry behavior for network calls.

What is the best way to prevent retry storms in Python applications?▼

The best way to prevent retry storms in Python applications is to use exponential backoff with jitter. This approach bounds retries and randomizes delay intervals, mitigating synchronized request surges.