Cosmograph - Async Task Scheduler
Cosmograph is a library for scheduling asynchronous tasks using the apscheduler library. It provides decorators to easily schedule tasks at specific times, intervals, or dates.
Installation
pip install apscheduler
Quick Start
from scheduler import Cosmograph, time_schedule, interval_schedule, date_schedule, on_shutdown
Use Cosmograph and scheduling methods as needed
Features
Schedule tasks at specific times using cron-like syntax. Schedule tasks at regular intervals. Schedule tasks to run at a specific date and time. Gracefully shut down the scheduler when the application is shutting down.
Usage
Time Schedule
@time_schedule(hour=12, minute=30)
async def my_scheduled_task():
print("Task executed at 12:30 PM.")
Interval Schedule
@interval_schedule(minutes=15)
async def my_repeating_task():
print("Task executed every 15 minutes.")
Date Schedule
@date_schedule(run_date="2023-01-01 00:00:00")
async def my_one_time_task():
print("Task executed once at the specified date and time.")
Graceful Shutdown
# Perform this during application shutdown
on_shutdown()
Contribution
Feel free to contribute by opening issues or creating pull requests. We welcome your feedback and contributions!
License
This project is licensed under the MIT License AGPLv3 - see the LICENSE file for details.
Release files for python-cosmograph 0.1.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 | |
|---|---|---|---|
| python_cosmograph-0.1.1.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_cosmograph-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / python_cosmograph-0.1.1.tar.gz
| Download URL | python_cosmograph-0.1.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05c62eec47c2f920988f7ee8cdbf0153dab037ffe30635a5b82e1640c9651531
|
|
BLAKE2b-256 checksum How to use checksums |
fd5cdb1c2353302a9eeeed00627607ef1bd779e1097f94a627b8a29ffc5e2cb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.6 Windows/10
|
Release files / python_cosmograph-0.1.1-py3-none-any.whl
| Download URL | python_cosmograph-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
197cfc69026f98f5f82d4497a420947eb1dcc4738fc45675290101872eb9764e
|
|
BLAKE2b-256 checksum How to use checksums |
bf3f1b1e94cdceb2cf6192ac6b53a915f3a6be2589ad9f24bd5d126ef5448745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.6 Windows/10
|