bennybauer / resilient-requests

Resilient take on the requests library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resilient-requests

The goal of this library is to implement a resilient version of the requests library.

This library will support:

  1. Timeouts (already supported by requests)
  2. Retry (via HttpAdapter, using urllib3 Retry class)

Usage

Eventually the interface should be something like this:

requests.get(url, timeout=(connect_seconds, read_seconds), retry=(total, backoff_factor, status_forcelist))

For example:

requests.get('https://example.com/posts', timeout=(2, 1), retry=(3, 0.1, [500, 501]))

About

Resilient take on the requests library


Languages

Language:Python 100.0%