Next Gen. simple retrying for asyncio.
Project description
async_retrying
Next Gen. simple retrying for asyncio - fork/fix from https://GitHub.com/hellysmile/async_retrying but updated for Python 3.10+ only
Installation
shell
pip install async_retrying_ng
Usage
python
import asyncio
from async_retrying_ng 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.10+ 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
Built Distribution
Close
Hashes for async_retrying_ng-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59eb82206a8d8237ed21a64012a4a0d8752c0812e81418dad9abe7acc4d60f2a |
|
MD5 | 323b36ffafedd6cfd17f1dc3a76d59af |
|
BLAKE2b-256 | 9debcedde4619e759062d8463ae4d12237e425e0084e630d53c013ed1b1d615c |