See http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
$ pip install https://github.com/saltycrane/retry-decorator/archive/v0.1.2.tar.gz
from retry_decorator import retry
Note: Python 2.7 or 3 is required to run the tests.
$ python test_retry_decorator.py