Skip to main content

Timestamp manager

Project description


Build Status

Build Status


In order to install, you can either use pypi with either

pip3 install timestamps


python3 -m pip install timestamps


The library has several types defined


Represents a timestamp with a 10^-7 precision (same as the time.time() of python 3) You can instanciate it in various ways, each time, you can provide a non-keyword value or a value with as keyword either _float, _hex or _datetime, or with the methods from_float, from_hex and from_datetime Timestamps objects can ONLY represent POSITIVE timestamps.

# From the current time
t =

# With a float
t = Timestamp(1.0)
t = Timestamp.from_float(1.0)
t = Timestamp(_float=1.0) # WARNING: Discouraged, use Timestamp.from_float instead

# With a datetime
t = Timestamp(
t = Timestamp.from_datetime(
t = Timestamp( # WARNING: Discouraged, use Timestamp.from_datetime instead 

# With an hex
t = Timestamp(_hex='f')  # WARNING: Discouraged, use Timestamp.from_hex instead
t = Timestamp('0xf0')
t = Timestamp.from_hex('#FF')

# With another timestamp
t = Timestamp(

You can compare them with anything that can fit in the Timestamp initializator, namely floats, datetimes, and hex values. <
time.time() <
'0xff' < Timestamp(time.time())

Project details

Download files

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

Files for timestamps, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size timestamps-1.3.0-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size timestamps-1.3.0.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page