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.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_cosmograph-0.1.1.tar.gz.
File metadata
- Download URL: python_cosmograph-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05c62eec47c2f920988f7ee8cdbf0153dab037ffe30635a5b82e1640c9651531
|
|
| MD5 |
94dd87db750797fc80bd42fd7aecf255
|
|
| BLAKE2b-256 |
fd5cdb1c2353302a9eeeed00627607ef1bd779e1097f94a627b8a29ffc5e2cb2
|
File details
Details for the file python_cosmograph-0.1.1-py3-none-any.whl.
File metadata
- Download URL: python_cosmograph-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
197cfc69026f98f5f82d4497a420947eb1dcc4738fc45675290101872eb9764e
|
|
| MD5 |
ba089b7a2061a8ec62d7a102f8d30b2e
|
|
| BLAKE2b-256 |
bf3f1b1e94cdceb2cf6192ac6b53a915f3a6be2589ad9f24bd5d126ef5448745
|