Skip to main content

Wrapper that retries failed lowhaio HTTP requests

Project description


Wrapper that retries failed lowhaio HTTP requests. Allows retries of exceptions from failed HTTP requests.


pip install lowhaio_retry


The request function returned from lowhaio.Pool must be wrapped with lowhaio_retry.retry, as in the below example. This will retry the request, waiting the specified interval between retries. If the request still fails, the final exception will be bubbled up to client code.

So instead of a request like

from lowhaio import Pool

request, _ = Pool()

body = ...

code, headers, body = await request(
    b'PUT', '', body=body,
    headers=((b'content-length', b'1234'),),

you can write

from lowhaio import Pool, HttpConnectionError, HttpDataError
from lowhaio_retry import retry

request, _ = Pool()

retriable_request = retry(request,
        # Seconds to wait after each exception
        (HttpConnectionError, (0, 0, 0)),
        (HttpDataError, (0, 1, 2, 4)),

body = ...

code, headers, body = await retriable_request(
    b'PUT', '', body=body,
    headers=((b'content-length', b'1234'),),

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lowhaio-retry, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size lowhaio_retry-0.0.5-py3-none-any.whl (3.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size lowhaio_retry-0.0.5.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

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