Timeless - a datetime toolkit for people in a hurry.
Timeless sits on sholders of giants to provide a simple and easy to use datetime toolkit. Simple date ranges, datetime operations and just one import.
This package is a work in progress and it was created as a study object.
🧠 Features
- ✔️ very simple API
- ✔️ minimal code to get things done
- ✔️ easy use with other packages
- ✔️ just one import
- ✔️ few dependencies
📦 Installation
pip install timeless
📝 Why Timeless?
It provides a simple API, heavily inspired by Pendulum.
I love Pendulum, although since last year (maybe 2 years) it doesn't seem to be actively maintained. If you like Pendulum, you will like Timeless. If you want a easy to adopt, integrate and expand package, you will like Timeless.
💻 Sample usage
Timeless use two main concepts: Datetime and Period. A datetime is a point in Time, and a Period is a duration.
Timeless doesn`t differentiate between datetime and date objects.
All datetimes are assumed to be in the UTC+00:00 timezone if any other timezone isn`t specified.
import timeless
start = timeless.datetime(1900, 1, 1, zone="UTC")
end = start.add(years=1)
end.subtract(months=1)
start.set(year=2099, month=2, day=26, hour=5, zone="America/Sao_Paulo")
start.is_past() # True
start.is_future() # False
start.set(year=2099).is_future() # True
📜 Docs
The docs are under development, but it's (very) early stage is already available.
🏗️ Development
Timeless relies on Poetry.
Install the Python dependencies with:
poetry install
⚗️ Testing
poetry run pytest --cov=timeless tests/
Metadata
Release files for timeless 0.2.7
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 |
|---|---|---|---|---|
| timeless-0.2.7.tar.gz | 11.7 kB | Without provenance | Details for timeless-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| timeless-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for timeless-0.2.7-py3-none-any.whl |
Total release size: 24.1 kB
Release files / timeless-0.2.7.tar.gz
| Download URL | timeless-0.2.7.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab2b478b0c52d60fba5317dd46b4c97c52a30a5b00ab09569ad095c93b9b996f
|
|
BLAKE2b-256 checksum How to use checksums |
92715b2f738293e45cdfbe05cdef36ece575237055864d5fb90e5bd159e2b502
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.8.10 Linux/5.15.0-1022-aws
|
Release files / timeless-0.2.7-py3-none-any.whl
| Download URL | timeless-0.2.7-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8731a037686fc930e6010f5674745a0a87f47536fc933279b1cdfb69f31fbb96
|
|
BLAKE2b-256 checksum How to use checksums |
79ae02cbccf929a64d3710d449f067c65b721ff74b073b6980e1d0ba187fc81d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.8.10 Linux/5.15.0-1022-aws
|
Security for timeless 0.2.7
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.