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 details)
File details
Details for the file retrying-async-1.0.0.tar.gz.
File metadata
- Download URL: retrying-async-1.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61e2f8af6f2a4888f4241c7af144dd5e4b70e1df0c15c22b6d8c88edcaf92b29
|
|
| MD5 |
f0d80e95bf34cbf0c3b2965b1584faa6
|
|
| BLAKE2b-256 |
50bdf706af2c28ea9d128637d23f896988da12504603a4e7c4c5b85ddfe2ffc3
|