#AsyncRepeat A simple decorator for repeating async functions. The main idea is that a coroutine can only be awaited for one time. In some special case that an async function needs to be run for multiple times, use this tool for an easy approach
Get started
First install it with pip:
pip install async-repeat
Then in your program:
import asyncio
from async_repeat import repeat
@repeat(3)
async def foo():
print("foo")
asyncio.run(foo())
The result will be:
foo
foo
foo
The repeat decorator has two modes:
- Concurrent: The function will create tasks and run the tasks at the same time
- Synchronous: The coroutines will run one by one
Metadata
Release files for async-repeat 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| async-repeat-0.0.1.tar.gz | 2.1 kB | Without provenance | Details |
Release files / async-repeat-0.0.1.tar.gz
| Download URL | async-repeat-0.0.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03a530b4b5b7f6d0c1d9d26536fd0ff05c175a25c3f7e050d48caa02611e2b25
|
|
BLAKE2b-256 checksum How to use checksums |
31ed93ffb8cf0989b485d8fcb257b776cc76f443e809f12a20f356b10e39ee56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4
|
Security for async-repeat 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.