Skip to main content

All in one retry and aioretry decorators

Project description

KaioRetry

PyPI version Supported Python Version License PyPI - Downloads

Pylint Static Quality Github Action Pylint Static Quality Github Action

KaioRetry is (yet another) retry decorator implementation, which is clearly inspired by the original retry module and is actually backward compatible with it.

Basic usage

Transparently perform retries on failures:

from kaioretry import retry, aioretry


@retry(exceptions=ValueError, tries=2)
def some_func(...):
    ...


@aioretry(exceptions=(ValueError, SomeOtherError), tries=-1, delay=1)
async def some_coroutine(...):
    ...

Documentation

If you care to read more, a more lengthy documentation is available on readthedocs.

Feedback welcome.

Project details


Download files

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

Source Distribution

kaioretry-0.9.2.tar.gz (18.1 kB view hashes)

Uploaded Source

Built Distribution

kaioretry-0.9.2-py3-none-any.whl (19.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page