new version async retrying package.
Project description
- info:
Simple retrying for asyncio
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
aio_retrying-1.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for aio_retrying-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8f255219ae3d9bf11012c3175cfca46689e0752607d6c6da6dcf8082c25984a |
|
MD5 | 097180095eed95e14b9d866f27c77113 |
|
BLAKE2b-256 | 67ebc6a0a54d5f271a1a3d3427e2986475ba89295b14ec3f052e1134dde82519 |