Adding retries to Requests.get() with exponential backoff
GET requests after waiting for a specific time interval. With each unsuccessful request, the time interval increases exponentially (it doubles). The undertaking is declared ultimately unsuccessful when the time interval gets bigger than a maximum backoff value.
pip install get_retries
import get_retries # max_backoff: maximum interval to wait in seconds response = get_retries.get('https://wikipedia.com', max_backoff=32) if response: print(response.status_code)
For more information check out the code.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for get_retries-0.1.1-py3-none-any.whl