Skip to main content

Datetime for people in a hurry.

Project description

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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timeless-0.1.8.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timeless-0.1.8-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file timeless-0.1.8.tar.gz.

File metadata

  • Download URL: timeless-0.1.8.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.5 Linux/5.13.0-1021-aws

File hashes

Hashes for timeless-0.1.8.tar.gz
Algorithm Hash digest
SHA256 2ccacaa06c211fa4283df24bd7ff040d08588c897c16ff82c810c5505d40e9ec
MD5 053592d3f2563689dbf923029502f9b6
BLAKE2b-256 81649a6651f4cf0fba620a45c8f375413c69dd5773e980347f22189d2a707d23

See more details on using hashes here.

File details

Details for the file timeless-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: timeless-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.5 Linux/5.13.0-1021-aws

File hashes

Hashes for timeless-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8759e8c9d1cbd1973f633182784e191a99933c32893cfef5b195f13864066c26
MD5 21f6e0e51bae8384ad896d6de3ea18e1
BLAKE2b-256 81d986bf9c24e64931fa7a8a4a3f3000e8ab5e4f0d1e4c7b641c7fe2c86140fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page