Skip to main content

Simple retrying for asyncio

Project description

info:

Simple retrying for asyncio

https://img.shields.io/travis/wikibusiness/async_retrying.svg https://img.shields.io/pypi/v/async_retrying.svg

Installation

pip install async_retrying

Usage

import asyncio

from async_retrying import retry

counter = 0

@retry
@asyncio.coroutine
def fn():
    global counter

    counter += 1

    if counter == 1:
        raise RuntimeError

@asyncio.coroutine
def main():
    yield from fn()

loop = asyncio.get_event_loop()

loop.run_until_complete(main())

assert counter == 2

loop.close()

Python 3.3+ is required

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

async_retrying-0.2.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file async_retrying-0.2.1.tar.gz.

File metadata

File hashes

Hashes for async_retrying-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5ed50352bd4e332e4c8959e5636b55db53ef02f86bf4aa2240221188099590c9
MD5 ba69d3755af31da64e9c6f0ee19b2c92
BLAKE2b-256 e65916c87eb20b711ee98bafa5b525aa3a388b2b9d76a26d5374d2fd54260e0c

See more details on using hashes here.

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