Skip to main content

Configurable elegant retrying.

Project description

Retrace your steps and try again.

PyPI Downloads PyPI Version Build Status

Retrace provides a configurable decorator which allows you to wrap Python callables and retry them on errors or other specific conditions.

Docs

It is simple and elegant.

See the documentation at:

http://d0ugal.github.io/retrace/

Quickstart

First, pip install retrace.

import retrace

@retrace.retry
def unstable():
    # ...

Boom. Done.

This function will now be retied up to 5 times if it raises an exception. You can customise how often it is retried, limit the exceptions and add validators to further verify the return value. Check out the docs for all this and more.

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 retrace, version 3.0.0
Filename, size File type Python version Upload date Hashes
Filename, size retrace-3.0.0-py2.py3-none-any.whl (5.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size retrace-3.0.0.tar.gz (11.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page