# periodic
Simple tool for run asyncio tasks periodically.
# Setup
```bash
pip install asyncio-periodic
```
# Example usage
```python
import asyncio
from datetime import datetime
from periodic import Periodic
async def periodically(param):
print(datetime.now(), 'Yay!', param)
await asyncio.sleep(1)
print(datetime.now(), 'Done!')
async def main():
p = Periodic(3, periodically, 'Periodically!')
await p.start()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever()
```
Simple tool for run asyncio tasks periodically.
# Setup
```bash
pip install asyncio-periodic
```
# Example usage
```python
import asyncio
from datetime import datetime
from periodic import Periodic
async def periodically(param):
print(datetime.now(), 'Yay!', param)
await asyncio.sleep(1)
print(datetime.now(), 'Done!')
async def main():
p = Periodic(3, periodically, 'Periodically!')
await p.start()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever()
```
Metadata
Release files for asyncio-periodic 2019.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 | |
|---|---|---|---|
| asyncio-periodic-2019.2.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asyncio_periodic-2019.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / asyncio-periodic-2019.2.tar.gz
| Download URL | asyncio-periodic-2019.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dfeaa51e27a1c0c46775100edd3e57aed7a8e2df0e6ab3a879ceefaf59da5f2
|
|
BLAKE2b-256 checksum How to use checksums |
e47bf3ecfed1ed9ef52395ffa908e9dd7c48130510f6e266fe591c9da4c9e167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / asyncio_periodic-2019.2-py3-none-any.whl
| Download URL | asyncio_periodic-2019.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f45cd105cd28cd3c315c53d2f18f73286f51ce317075a789158336b4fc1ee34
|
|
BLAKE2b-256 checksum How to use checksums |
bf69ac044fc8a82e72c32830dfef85ef7975de08771bfd676fd57e526ae03e71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|