Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.104s · 56.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.3s · import 0.130s · 57MB
55MB installed
● package 55MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Delorean
✓ from delorean import Delorean
✗ from delorean import delorean
The class is capitalized Delorean, not lowercase.
epoch
✓ from delorean import epoch
Basic usage: create a Delorean object for the current UTC time, or from a specific datetime with timezone, or from a Unix timestamp.
from delorean import Delorean, epoch
from datetime import datetime
d = Delorean()
print(d.datetime)
d2 = Delorean(datetime(2020, 1, 1, 0, 0, 0), timezone='US/Eastern')
print(d2.datetime)
print(Delorean(epoch=1000000000).datetime)
Errors
Common errors & fixes
ImportError: cannot import name 'Delorean'
You imported delorean (lowercase) instead of Delorean (capitalized).
fixUse: from delorean import Delorean
TypeError: an integer is required (got type str)
Passing a string as epoch instead of int/float.
fixUse epoch=int('1234567890') or epoch=1234567890. Upgrade
Version history
1.0.0latest on PyPI · released Feb 7, 2018
Audit
Dependencies
python-dateutilrequiredRequired for date parsing and timezone handling.
pytzrequiredRequired for timezone definitions.