Skip to main content

Timestamp

Build Status

Build Status

Install

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

pip3 install timestamps

or

python3 -m pip install timestamps

Usage

The library has several types defined

Timestamp

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 = Timestamp.now()

# 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(datetime.datetime.now())
t = Timestamp.from_datetime(datetime.datetime.now())
t = Timestamp(_datetime=datetime.datetime.now()) # 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(Timestamp.now())

You can compare them with anything that can fit in the Timestamp initializator, namely floats, datetimes, and hex values.

Timestamp.now() < Timestamp.now()
time.time() < Timestamp.now()
'0xff' < Timestamp(time.time())

Metadata

Release files for timestamps 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timestamps 1.3.0
File Size Uploaded Provenance Actions
timestamps-1.3.0.tar.gz 2.7 kB Without provenance Details for timestamps-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for timestamps 1.3.0
File Interpreter ABI Platform Actions
timestamps-1.3.0-py3-none-any.whl Python 3 none any Details for timestamps-1.3.0-py3-none-any.whl

Total release size: 5.7 kB

Release files / timestamps-1.3.0.tar.gz

Download URL timestamps-1.3.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd9e3a86c7934f70be5b4df494e3fc73551a97384c57f8152aaaa30281353a6b
BLAKE2b-256 checksum
How to use checksums
e164bdc6732e257f8c0c9a2399838bd91016a2cd34e65e195f69ef3db151f5f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

Release files / timestamps-1.3.0-py3-none-any.whl

Download URL timestamps-1.3.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0da6bf9ea0a4eaddff261b448f3012fb37d8ed0db4039f4b895b0ae23fb04f54
BLAKE2b-256 checksum
How to use checksums
48e0e4eab313273d788772b7fc92ccdfb026059712b04c819773d5565d37a15d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

Security for timestamps 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page