Simple retrying for asyncio
Project description
- info:
Simple retrying for asyncio
Installation
pip install async_retrying
Usage
import asyncio
from retrying_async import retry
counter = 0
@retry
async def fn():
global counter
counter += 1
if counter == 1:
raise RuntimeError
async def main():
await fn()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
assert counter == 2
loop.close()
Python 3.5+ 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
retrying-async-1.0.0.tar.gz
(3.3 kB
view hashes)