Tagged articles

tenacity

4 articles · Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Dec 15, 2025 · Backend Development

How to Build a Self‑Healing API Test Client with Automatic Token Refresh

Learn how to implement an automatic token‑refresh mechanism for API automation tests using Python’s requests and tenacity libraries, covering token refresh strategies, intercepting 401 responses, retry logic, client design, and production‑grade enhancements to ensure robust, unattended test execution.

API testingPythonToken Refresh
0 likes · 7 min read
How to Build a Self‑Healing API Test Client with Automatic Token Refresh
Python Programming Learning Circle
Python Programming Learning Circle
May 7, 2022 · Fundamentals

Using Tenacity: A Python Retry Library – Installation, Unlimited Retries, Stop Conditions, Intervals, and Logging

This article introduces the Tenacity Python library, explains how to install it, and demonstrates various retry strategies such as unlimited retries, stopping after success, limiting attempts or time, combining stop conditions, setting fixed or random wait intervals, and adding pre‑ and post‑retry logging with complete code examples.

BackoffLoggingcode-example
0 likes · 5 min read
Using Tenacity: A Python Retry Library – Installation, Unlimited Retries, Stop Conditions, Intervals, and Logging
Python Crawling & Data Mining
Python Crawling & Data Mining
Sep 27, 2020 · Backend Development

Mastering Elegant Retry Logic in Python with Tenacity

This article explains why retry mechanisms are essential for unstable network requests, introduces the Tenacity library, and provides clear, step‑by‑step Python examples covering basic retries, stop conditions, conditional retries, exception re‑raising, and callback handling.

backendcode exampleexception-handling
0 likes · 7 min read
Mastering Elegant Retry Logic in Python with Tenacity