Timezone aware Cron/Quartz parser
Project description
tzcron
A library to work with cron/quartz expressions and timezones.
Overview
tzcron provides a way to define schedules attached to timezones and get time occurrences out of it by just iterating the object created.
Install
>>> pip install tzcron
Usage
>>> import tzcron
>>> import pytz
>>> schedule = tzcron.Schedule("* * * * * *", pytz.utc)
>>> str(schedule)
'Cron: * * * * * * @UTC [2016-09-25 19:10:48.948486+00:00->None]'
>>> next(schedule)
datetime.datetime(2016, 9, 25, 19, 11, tzinfo=<UTC>)
>>> next(schedule)
datetime.datetime(2016, 9, 25, 19, 12, tzinfo=<UTC>)
>>> next(schedule)
datetime.datetime(2016, 9, 25, 19, 13, tzinfo=<UTC>)
For further information, check the official documentation
Develop this package
To test the package:
> python -m nose
To release a new version of the package:
> python setup.py sdist bdist_wheel upload
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 tzcron-1.0.0.tar.gz.
File metadata
- Download URL: tzcron-1.0.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48ce0981e0bc1dcbc895927fa590a4b3485db3123ddcdfde65588d99e0fa5ce
|
|
| MD5 |
d060e5873dae158bef3ac2dd96908fd0
|
|
| BLAKE2b-256 |
03c7d5599259887ca1e36d32d5b844458078cfac22fc402a1ff48a07b23e6874
|
File details
Details for the file tzcron-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: tzcron-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9ec9c149085525157e6746b5f745069a39c7c5405d31cdd7e89a65cbb20b99f
|
|
| MD5 |
a58682303c674fba1672b2f7b8b23c5a
|
|
| BLAKE2b-256 |
e7239559e563db330b55f6e1f3ff3400849993b87ffd3bc21e4727b2fd6d617f
|