A custom python type for working with sparse ranges of padded timedate intervals
Project description
Availability
Python type for working with ranges of datetimes
Use Availability to calculate ranges of datetimes. A range consists of a start and end time that can be added or subtracted from another range.
availability = Availabilty([
AvailabilityRange(start_time=datetime.datetime(2022,11,1), end_time=datetime.datetime(2022,11,31,23,59,59)),
], padding_time_before=5, padding_time_after=10)
availability -= AvailabilityRange(start_time=datetime.datetime(2022,11,8), end_time=datetime.datetime(2022,11,10))
pip install availibility
Weird Behaviors
Jumping forward with DST
When working with availability ranges that exist in a jump, they will be converted to the "jumped time". So 2:30 would become 3:30 since there isn't technically a 2:30 on that day.
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
availability-0.0.3.tar.gz
(6.3 MB
view details)
Built Distribution
File details
Details for the file availability-0.0.3.tar.gz
.
File metadata
- Download URL: availability-0.0.3.tar.gz
- Upload date:
- Size: 6.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1616437d2d2a233eb1f772e057e8d617fa4752222c775477a89994a612e9009 |
|
MD5 | 64bceb42693354b8b58659f3c35939fe |
|
BLAKE2b-256 | 1d037e685ca25b2c96a932ab6964e4edbbdd2bc089cb6c64d8d2885eea7572b4 |
File details
Details for the file availability-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: availability-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6df4313b0eb763e96f825b5acfda9f8fdb5550c36c8ae4a86892e8f611ed4edc |
|
MD5 | fe53a151d4366bed34e852f3b4fdc688 |
|
BLAKE2b-256 | 5ae7bffc3d15555c93574e3965ec36695b7d904be50bd30ea6a6d89fec70e474 |