Skip to main content

Elegant time manipulation and reasoning library

Project description

Eones

Python PyPI Pylint Coverage Build Tox


Compatible with Python 3.9+ · No external dependencies · Portable and lightweight


✨ What is Eones?

Eones is a minimalist, dependency-free library for expressive, clear, and powerful date/time manipulation. Inspired by natural language semantics, it allows you to manipulate, compare, and transform dates as if they were living entities.

“That is not dead which can eternal lie, and with strange aeons even death may die.”
Abdul Alhazred, Necronomicon


📦 Installation

pip install "eones"

If you're working with timezones on Windows or containers:
⚠️ Also install tzdata:

pip install tzdata

🧪 Basic Example

from eones import Eones

z = Eones("2025-06-15")
z.add(months=1, days=3)  # -> add 3 days and 1 month

print(z.format("%Y-%m-%d"))  # → 2025-07-18
print(z.diff_for_humans("2025-06-10"))  # → in 5 days
print(z.diff_for_humans("2025-06-20", locale="es"))  # → hace 5 días

🔍 Key Features

  • ✅ Automatic parsing for str, dict, datetime, Eones
  • ✅ Add/subtract days, months, years, minutes, seconds
  • ✅ Date comparison (same week, within year, between ranges)
  • ✅ Full day/month/year ranges
  • ✅ Truncation and rounding by unit
  • ✅ Full support for ZoneInfo (PEP 615)
  • ✅ Zero external dependencies
  • ✅ Conversion to datetime, date, and native types
  • ✅ Human-friendly differences via diff_for_humans with locale support

You can add more languages by creating a new file in eones/locales/ with the translations for your locale. For example, fr.py for French.


🧾 Comparison with other libraries

Feature Eones Pendulum Arrow Delorean dateutil pytz
Modern, consistent API ⚠️
Date arithmetic (add/subtract)
Flexible parsing (string, dict, dt) ⚠️
Native timezone support ⚠️
No external dependencies
Coverage tested ≥ 97%
Can replace native datetime directly
Permissive license (MIT / BSD)
Actively maintained ⚠️

📚 Advanced Examples

You can find more usage examples in:


🔧 Tests & Coverage

tox
coverage html && open htmlcov/index.html

📖 Requirements

  • Python 3.9 or higher
  • (Optional) tzdata if using timezones in systems without a local zoneinfo database

📝 License

MIT © 2025 — Rodrigo Ezequiel Roldán
View full license

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

eones-1.2.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

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

eones-1.2.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file eones-1.2.0.tar.gz.

File metadata

  • Download URL: eones-1.2.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for eones-1.2.0.tar.gz
Algorithm Hash digest
SHA256 755dde154f71a0e2c2dc31785008d59ea45b73f7ca27f1e857500bb7d116d076
MD5 4bff415ef3a46e7da02faa8eebced3b4
BLAKE2b-256 800bb975a970301e6cfb14cd5e0b5d0c7d5559f7516cc394c08725d9dd1073b3

See more details on using hashes here.

File details

Details for the file eones-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: eones-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for eones-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1f4914d64756ea794121e50a1ad557123a636cb1ce592d36f3c199df3820887
MD5 9f645df14325f0a94a06259330035c4d
BLAKE2b-256 da4d8fd9498e85f0309dce8c9d91a30cc6cbd9bc61d770371883a4ca73e4d6cf

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