python-resilience

Automate retry logic, timeouts, and fault-tolerant decorators for Python apps.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/emilneuraz-ai/neuraz-web --skill python-resilience-emilneuraz-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-resilience
Source: https://github.com/emilneuraz-ai/neuraz-web/tree/main/.agents/skills/.agents/skills/python-resilience
Command: npx skills add https://github.com/emilneuraz-ai/neuraz-web --skill python-resilience-emilneuraz-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automate robust resilience for Python apps by providing retry logic, timeouts, and fault-tolerant decorators.

Core Features & Use Cases

  • Automatic retries with exponential backoff and jitter
  • Timeout management to prevent hanging calls
  • Fault-tolerant decorators and patterns for transient failures
  • Use case: wrap flaky external services and ensure stability during outages

Quick Start

Wrap a flaky API call with a retry decorator using exponential backoff and test with 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 functions with exponential backoff?

Apply fault-tolerant decorators to Python functions to automate retry logic with exponential backoff. This wraps transient operations to retry failed calls automatically, enforcing bounded retries and clear error handling for reliable behavior.

What's the best way to prevent hanging API calls in Python?

Use timeout management decorators to prevent hanging API calls in Python. This enforces strict timeout limits on external service calls and database operations, stopping indefinite waits and ensuring stable service behavior during outages.

Can I use fault-tolerant decorators for flaky external services in Python?

Yes, fault-tolerant decorators wrap flaky external services in Python to ensure stability. They apply automatic retries with jitter and bounded limits, handling transient failures seamlessly during temporary service outages.

Why does exponential backoff with jitter help with transient failures?

Exponential backoff with jitter spaces out retry attempts to avoid overwhelming a recovering service. This pattern prevents retry storms during transient failures, distributing load and increasing the chance of successful subsequent calls.

When do I need timeout management for Python database operations?

Implement timeout management for Python database operations when calls are prone to flaky behavior or transient network issues. This prevents indefinite hanging, enforces bounded execution times, and maintains reliable service behavior.

Does this retry approach work without external dependencies?

Yes, this retry approach works without external dependencies, using Python decorators natively. It provides bounded retries, timeout management, and error handling logic independently, requiring no additional libraries to enforce fault tolerance.