A decorator to recycle tasks in the event loop
Installation
pip install aiorecycle
Usage example
import asyncio
import aiorecycle
@aiorecycle.cycle()
async def task():
if asyncio.get_event_loop().time() % 2 == 0:
print('make some periodic work')
async def main():
await task()
await asyncio.sleep(3) # emulate very important work
if __name__ == "__main__":
asyncio.run(main())
License
aiorecycle library is offered under Apache 2 license.
Metadata
Release files for aiorecycle 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiorecycle-0.0.2.tar.gz | 1.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiorecycle-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / aiorecycle-0.0.2.tar.gz
| Download URL | aiorecycle-0.0.2.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5cd37a8396f5f75b85166a3bb53a48c40e575a92a4ba1e75f6f37d7a904d376
|
|
BLAKE2b-256 checksum How to use checksums |
874be54f41819ec11e88a59ca20b7af06133cb0ee241c1a19a02dfd5f5bd9baf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.6
|
Release files / aiorecycle-0.0.2-py3-none-any.whl
| Download URL | aiorecycle-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae3509d25291abc523afbdb3c6e5bb2eb8fa05679a92dc59df585b62bf2702a5
|
|
BLAKE2b-256 checksum How to use checksums |
e719f63cf145a8328a6043144122637f1f3ab1827570ff1975843a4657d5885c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.6
|