Man, http error 429 is a nightmare.
If you’re lazy (like me), just use `backoff` lib. Here’s how:
```python
import backoff
import requests
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=5)
def make_request():
r = requests.get("your_api_url")
r.raise_for_status()
return r
```
It’ll handle the backoff for you. Easy peasy.
If you’re lazy (like me), just use `backoff` lib. Here’s how:
```python
import backoff
import requests
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=5)
def make_request():
r = requests.get("your_api_url")
r.raise_for_status()
return r
```
It’ll handle the backoff for you. Easy peasy.
