Adding retries to Requests.get() with exponential backoff
Project description
get_retries

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.
Install
pip install get_retries
Usage
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.
License
MIT.
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for get_retries-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ad591cc0aeabf1fc970bbb004f85daad1668b321035215cd8dc4d836778b12b |
|
MD5 | 0c06a133e29e7ad0fe92234714c1b1c3 |
|
BLAKE2b-256 | ca8461fa80bfd47931cee20fc3601ddc0b547f6124f69e85c519b922d59e5aad |