adapters

Module that contains default transport adapters for use with requests.

class cloudant.adapters.Replay429Adapter(retries=3, initialBackoff=0.25)

Bases: requests.adapters.HTTPAdapter

A requests TransportAdapter that extends the default HTTPAdapter with configuration to replay requests that receive a 429 Too Many Requests response from the server. The duration of the sleep between requests will be doubled for each 429 response received.

Parameters can be passed in to control behavior:

Parameters:
  • retries (int) – the number of times the request can be replayed before failing.
  • initialBackoff (float) – time in seconds for the first backoff.