Skip to main content

Adding retries to Requests.get() with exponential backoff

Project description

get_retries Build Status PyPI PyPI - Python Version

Adding retries to Requests.get() with exponential backoff.

Retry unsuccessful 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('', max_backoff=32)

if response:

For more information check out the code.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get_retries-0.1.1.tar.gz (2.1 kB view hashes)

Uploaded source

Built Distribution

get_retries-0.1.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page