If you’re dealing with unreliable APIs, consider using `tenacity` for retries. It’s super flexible and works great with the python requests module.
Example:
```python
from tenacity import retry, stop_after_attempt
@retry(stop=stop_after_attempt(3))
def make_request():
response = requests.get(url)
response.raise_for_status()
return response
```
Saves you from writing boilerplate retry logic.
Example:
```python
from tenacity import retry, stop_after_attempt
@retry(stop=stop_after_attempt(3))
def make_request():
response = requests.get(url)
response.raise_for_status()
return response
```
Saves you from writing boilerplate retry logic.
