Lavos: A Pythonic Cron Expression Serializer with Fluent Syntax
Lavos is an innovative Python library that simplifies working with cron expressions. It replaces the cryptic syntax of traditional cron expressions with a fluent, human-readable API. Lavos allows you to define cron schedules for your tasks intuitively, making schedule management in Python applications easier than ever.
Features
- Fluent Syntax: Enjoy a fluent and expressive syntax for defining cron schedules, making your code more readable and maintainable.
- AWS Cron Support: Compatible with traditional Unix and AWS cron expressions, providing versatility for different environments.
- Syntax Sugars: Includes convenient syntax sugars for common scheduling patterns, allowing for more concise code.
Installation
Install Lavos using pip:
pip install lavos
Usage
Lavos offers a range of functionalities for scheduling tasks. Below are examples demonstrating its versatility:
Basic Usage
from lavos import Lavos, MON, JAN, FEB, MAR, WEEKDAYS
cron = Lavos()
- Every 5 Minutes:
# Cron: */5 * * * * cron.every(5).minutes
- Every Hour:
# Cron: 0 * * * * cron.every(1).hours
- Daily at Specific Time:
# Cron: 0 14 * * * cron.at("14:00").daily
- Specific Weekday at Time:
# Cron: 0 12 * * 5 cron.at("12:00").on(THU)
- First Day of Every Month:
# Cron: 0 0 1 * * cron.on(1).monthly
- Specific Days of Specific Months:
# Cron: 0 0 15 1,2 * cron.on(15).of(JAN, FEB)
- Every Weekday at Multiple Times:
# Cron: 0 9,17 * * 1-5 cron.at("09:00", "17:00").on(WEEKDAYS)
- First Day of Spring:
# Cron: 0 0 20 3 * cron.on(20).of(MAR).annually()
Using AWS Format
You can also create schedules using the AWS cron format:
cron = Lavos(format="aws")
# Every 5 minutes in AWS format
# */5 * * * ? *
cron.every(5).minutes
# Every weekday at 09:00 in AWS format
# 0 9 * * ? *
cron.at("09:00").on(WEEKDAYS)
Advanced Features
Contributing
We welcome contributions to Lavos! Whether it's adding new features, improving documentation, or fixing bugs, your input is valuable.
License
Lavos is released under MIT. See the LICENSE file for more details.
Metadata
Release files for lavos 0.1.0
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 |
|---|---|---|---|---|
| lavos-0.1.0.tar.gz | 2.9 kB | Without provenance | Details for lavos-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lavos-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for lavos-0.1.0-py3-none-any.whl |
Total release size: 6.0 kB
Release files / lavos-0.1.0.tar.gz
| Download URL | lavos-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b589e7d1e2d6a8c4be433e87ce3e520398b6d975db96bd0b96d2924d330952a2
|
|
BLAKE2b-256 checksum How to use checksums |
c6088c8f046b775fd4854464d6940de0d13fe0f9f902851072bc7dff5a9d6dd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.9.13 Darwin/22.3.0
|
Release files / lavos-0.1.0-py3-none-any.whl
| Download URL | lavos-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5dc1d9f9043554635eb621d9740fd482c25a7c754bf670fa7720308f529e58fb
|
|
BLAKE2b-256 checksum How to use checksums |
592a7eae595d784cff62c12f8855eca0f00a59ab6a144402a00d6248093ab085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.9.13 Darwin/22.3.0
|
Security for lavos 0.1.0
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.