python-resilience

Implement retry logic with exponential backoff and jitter for Python applications.

4|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/AI-Foundry-Core/ril-agents --skill python-resilience-ai-foundry-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-resilience
Source: https://github.com/AI-Foundry-Core/ril-agents/tree/main/plugins/python-development/skills/python-resilience
Command: npx skills add https://github.com/AI-Foundry-Core/ril-agents --skill python-resilience-ai-foundry-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python resilience patterns for building fault-tolerant applications that gracefully handle transient failures, network issues, and service outages.

Core Features & Use Cases

  • Exponential backoff, jitter, and bounded retries to recover from transient errors.
  • Decorators and patterns for retry logic, timeouts, and fault-tolerant design.
  • Use cases include API calls, database operations, and distributed service communication that may experience intermittent failures.

Quick Start

Run a basic retry example using tenacity to retry a failing API call.

Frequently Asked Questions about python-resilience

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

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

To implement retry logic with exponential backoff in Python, you use decorators to apply bounded retries and jitter to network calls. This approach automatically recovers from transient errors by increasing the delay between subsequent attempts.

What is the best way to handle transient errors and timeouts in Python microservices?

The best way to handle transient errors and timeouts in Python microservices is applying fault-tolerant design patterns. You use decorators for cross-cutting concerns to manage API integration failures and gracefully recover from intermittent network issues.

Can I use tenacity decorators for cross-cutting retry concerns in API integrations?

Yes, you can use tenacity decorators for cross-cutting retry concerns in API integrations. They provide testable dependency injection and allow you to apply bounded retries and exponential backoff cleanly across network calls without cluttering core business logic.

When do I need bounded retries and jitter for Python network calls?

You need bounded retries and jitter for Python network calls when recovering from transient errors in distributed service communication. Jitter randomizes retry intervals to prevent thundering herd problems, while bounded retries limit maximum attempts to avoid cascading failures.

Does this Python retry approach support testable dependency injection for microservice communications?

Yes, this Python retry approach supports testable dependency injection for microservice communications. It isolates fault-tolerant logic via decorators, allowing you to mock network calls and timeout behaviors cleanly during unit testing without modifying core application workflows.