Hey there! I’ve found that using `urllib3` directly with retry logic is a game-changer for python requests retry.
Here’s a quick snippet:
```python
from urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
retries = Retry(total=5, backoff_factor=1)
session = requests.Session()
session.mount('http://', HTTPAdapter(max_retries=retries))
```
This handles most of the edge cases for me, including timeouts and server ghosts.
Also, check out this guide on [Real Python](https://realpython.com/python-requests/)—it’s super helpful!
Here’s a quick snippet:
```python
from urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
retries = Retry(total=5, backoff_factor=1)
session = requests.Session()
session.mount('http://', HTTPAdapter(max_retries=retries))
```
This handles most of the edge cases for me, including timeouts and server ghosts.
Also, check out this guide on [Real Python](https://realpython.com/python-requests/)—it’s super helpful!
