Elegant time manipulation and reasoning library
Project description
Eones
Compatible with Python 3.8+ · 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 installtzdata: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
🔍 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
🧾 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.8 or higher
- (Optional)
tzdataif using timezones in systems without a local zoneinfo database
📝 License
MIT © 2025 — Rodrigo Ezequiel Roldán
View full license
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eones-1.1.0.tar.gz.
File metadata
- Download URL: eones-1.1.0.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf48f6d7bdd69a061e2abcc28963c612dc6803fc0cd888d3344821b0e834913
|
|
| MD5 |
b7bda8c973b63640b662eefde65e36c6
|
|
| BLAKE2b-256 |
feb90617045248b3e349e5d28ff4de2ca6b955ea52caf888e2251db94a7c4d5b
|
File details
Details for the file eones-1.1.0-py3-none-any.whl.
File metadata
- Download URL: eones-1.1.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30de6ace498a8b340f915cb79db35de16baa72377a75d1c523d7fdb6f84ff006
|
|
| MD5 |
9d278c9a33d5bd2b146e1876819afd98
|
|
| BLAKE2b-256 |
269ff23e749667091ccb63a3d50a5f24ed366f76c2f0e8c9a81cc923c2ee7dd9
|