https://github.com/thombashi/retryrequests
A Python library that make HTTP requests with exponential back-off retry by using requests package.
https://github.com/thombashi/retryrequests
python-library requests-module retry-library
Last synced: about 1 year ago
JSON representation
A Python library that make HTTP requests with exponential back-off retry by using requests package.
- Host: GitHub
- URL: https://github.com/thombashi/retryrequests
- Owner: thombashi
- License: mit
- Created: 2019-03-30T07:39:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-06T08:54:17.000Z (over 4 years ago)
- Last Synced: 2025-04-27T07:07:33.574Z (about 1 year ago)
- Topics: python-library, requests-module, retry-library
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. contents:: **retryrequests**
:backlinks: top
:depth: 2
Summary
============================================
A Python library that make HTTP requests with exponential back-off retry by using `requests `__ package.
.. image:: https://badge.fury.io/py/retryrequests.svg
:target: https://badge.fury.io/py/retryrequests
:alt: PyPI package version
.. image:: https://img.shields.io/pypi/pyversions/retryrequests.svg
:target: https://pypi.org/project/retryrequests
:alt: Supported Python versions
Installation
============================================
::
pip install retryrequests
Usage
============================================
``retryrequests`` has same interface with ``requests``:
:Sample Code:
.. code-block:: python
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:
.. code-block:: json
{
"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+
- `requests `__