aiosched - Python asyncio jobs scheduler
Executes specified asyncio jobs with a chosen interval. Has relatively small number of features but it's fast.
Why one more scheduler?
- it's extremely accurate and fast
- it's simple
- all methods are thread-safe
Example
from aiosched import scheduler
import asyncio
async def test1(a, b, c):
print(f'JOB1 {a} {b} {c}')
async def test2():
print('JOB2')
async def test3():
print('JOB3')
from aiosched import scheduler
loop = asyncio.new_event_loop()
scheduler.start(loop=loop)
# jobs can be added before actual start in pending mode
job1 = scheduler.create_threadsafe(target=test1, args=(1, 2, 3), interval=1)
job2 = scheduler.create_threadsafe(target=test2, interval=0.5)
# run job once after 5 seconds
job3 = scheduler.create_threadsafe(target=test3, number=1, timer=5)
# cancel job 2
scheduler.cancel(job2)
# equal to
job2.cancel()
loop.run_forever()
or run scheduler loop as coroutine:
loop = asyncio.new_event_loop()
job1 = scheduler.create_threadsafe(target=test1, args=(1,2,3), interval=0.1)
job2 = scheduler.create_threadsafe(target=test2, interval=0.1)
loop.run_until_complete(scheduler.scheduler_loop())
Install
pip3 install aiosched
Advanced
Read AsyncJobScheduler and AsyncScheduledJob classes documentation in pydoc.
Metadata
Release files for aiosched 0.0.25
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 | Actions |
|---|---|---|---|---|
| aiosched-0.0.25.tar.gz | 3.8 kB | Without provenance | Details for aiosched-0.0.25.tar.gz |
Release files / aiosched-0.0.25.tar.gz
| Download URL | aiosched-0.0.25.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41d9abf0553f15cbd239ca3633262b8dd522a4a9f5127d84c8cc9c59292a1f3b
|
|
BLAKE2b-256 checksum How to use checksums |
3e7b432bd5bd5e04991bd39b574208bb8e57fc8ef6e0c62d758feeab1c70c4d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Security for aiosched 0.0.25
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.