tenacity-retry

Implement Tenacity retry decorators with exponential backoff and jitter for Python functions.

1|Updated Sep 20, 2025
One-click install
npx skills add https://github.com/Alex1980Alex/1C-Enterprise_Framework --skill tenacity-retry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tenacity-retry
Source: https://github.com/Alex1980Alex/1C-Enterprise_Framework/tree/main/.claude/skills/tenacity-retry
Command: npx skills add https://github.com/Alex1980Alex/1C-Enterprise_Framework --skill tenacity-retry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement robust retry logic for unreliable API calls and I/O operations.

Core Features & Use Cases

  • Decorator-based retry for sync and async functions with exponential backoff and jitter.
  • Prebuilt retry utilities for common scenarios (LLM calls, embeddings, DB operations, HTTP requests) and a configurable retry factory.
  • Clear examples and templates to quickly integrate retry behavior into workflows.

Quick Start

Install tenacity and decorate your functions with the ready-made retry decorators to enable automatic retry behavior.

Frequently Asked Questions about tenacity-retry

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

FAQPage Schema
How do I implement retry logic for Python API calls?

Implement retry logic for Python API calls by applying Tenacity decorators to your functions. This automatically handles transient failures using exponential backoff with jitter, simplifying integration for unreliable I/O operations.

Can I use retry decorators with async Python functions?

Yes, you can use retry decorators with async Python functions. The Skill supports both synchronous and asynchronous functions, allowing you to apply exponential backoff and jitter to concurrent network operations.

What is the best way to retry LLM calls and database operations in Python?

The best way to retry LLM calls and database operations in Python is using prebuilt Tenacity decorators. The Skill provides ready-made patterns like retry_llm_call and retry_db_operation to quickly integrate resilient behavior.

How does exponential backoff with jitter work for network requests?

Exponential backoff with jitter for network requests works by progressively increasing the wait time between retries and adding random variance. This prevents thundering herd problems when retrying transient network failures.

Do I need to configure custom retry rules for specific error patterns?

You do not strictly need to configure custom retry rules for specific error patterns, as prebuilt utilities exist. However, a configurable retry factory is available to generate custom configurations for unique error scenarios.