Skip to main content
# calendar_scheduler
Google like calendar scheduler. Finding eta with given parameters is bit of challenging. I found a pattern here and made it as a package.

# Installation

pip3 install calendar_scheduler

# Usage
There are two types of schedulers that you can use of.<br>
### 1. Date Specific<br >
You can specify single or multiple dates to get the eta referenced to current datetime


from scheduler import Scheduler

scheduler = Scheduler()

payload = {
"schedule_type": "date_specific",
"timezone": "<valid_timezone>",
"schedules": [
{
"start_date": "<mm/dd/yyyy>*",
"start_time": "<HH:MM AM/PM>*"
}
]
}
eta = scheduler.get_next_eta(schedule_data=payload)
# This will return UTC converted eta (datetime obj)
# You can specify multiple dates

### 2. Recurring using `cron`
You can specify a cron to get next eta with respect to current datetime and also you can specify the base datetime.

from scheduler import Scheduler

scheduler = Scheduler()

payload = {
"schedule_type": "cron",
"timezone": "<valid_timezone>",
"start_date": "<mm/dd/yyyy>*",
"start_time": "<HH:MM AM/PM>*",
"end_date": "[<mm/dd/yyyy>]",
"end_time": "[<HH:MM AM/PM>]",
"cron": "<cron expression>"
}
eta = scheduler.get_next_eta(schedule_data=payload)
# This will return UTC converted eta (datetime obj)

# Unit Tests

python3 -m unittest discover scheduler.tests

# Coverage

coverage run -m unittest discover scheduler.tests
coverage report

# Cron generator
https://www.npmjs.com/package/cron-builder

# Thanks
https://github.com/kiorky/croniter

# How to contribute

- Submit a PR, welcome for feedback

Note: I've been using package from so long and it is in production.

# Author
Partha saradhi Konda <parthasaradhi1992@gmail.com>

Metadata

Release files for calendar_scheduler 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for calendar_scheduler 0.0.2
File Size Uploaded
calendar_scheduler-0.0.2.tar.gz 8.9 kB Details

Release files / calendar_scheduler-0.0.2.tar.gz

Download URL calendar_scheduler-0.0.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
922d8b9cfef3476c8de81af331b364bee0ccb4b565bc3950c81ef892c65da4ca
BLAKE2b-256 checksum
How to use checksums
703ee117aa20b8f7ceac7612177780b0e5a7807936bdf64f956636c6a8688594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page