Skip to main content

A Python library that make HTTP requests with exponential back-off retry by using requests package.

Project description

<nav class="contents" id="retryrequests" role="doc-toc">

retryrequests

</nav>

Summary

A Python library that make HTTP requests with exponential back-off retry by using requests package.

PyPI package version Supported Python versions

Installation

pip install retryrequests

Usage

retryrequests has same interface with requests:

Sample Code:
import json

import retryrequests


r = retryrequests.get("https://kctbh9vrtdwd.statuspage.io/api/v2/status.json")
r.raise_for_status()

print(json.dumps(r.json(), indent=4))
Output:
{
    "page": {
        "id": "kctbh9vrtdwd",
        "name": "GitHub",
        "url": "https://www.githubstatus.com",
        "time_zone": "Etc/UTC",
        "updated_at": "2019-03-30T07:11:24.851Z"
    },
    "status": {
        "indicator": "none",
        "description": "All Systems Operational"
    }
}

Dependencies

Python 3.6+

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

retryrequests-0.2.0.tar.gz (4.9 kB view hashes)

Uploaded source

Built Distribution

retryrequests-0.2.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page