Hey there! I’ve been down this rabbit hole before. For Python requests retry, I’d recommend using `tenacity`. It’s a bit more flexible than `requests-retry` and lets you customize retries, backoff, and even add conditions for when to retry.
For timeouts, I usually set a base timeout and increase it slightly with each retry. And yeah, exponential backoff is a must if you’re dealing with unreliable servers.
Here’s a quick example with `tenacity`:
```python
from tenacity import retry, wait_exponential
@retry(wait=wait_exponential(multiplier=1, min=4, max=10))
def make_request():
# your request logic here
```
Hope that helps!
For timeouts, I usually set a base timeout and increase it slightly with each retry. And yeah, exponential backoff is a must if you’re dealing with unreliable servers.
Here’s a quick example with `tenacity`:
```python
from tenacity import retry, wait_exponential
@retry(wait=wait_exponential(multiplier=1, min=4, max=10))
def make_request():
# your request logic here
```
Hope that helps!
