Hightime Python API
Project description
Hightime
Overview
Hightime allows for up to yoctosecond precision replacements for the datetime datetime and timedelta types.
Installation
Hightime can be installed by cloning the master branch and then in a command line in the directory of setup.py run:
pip install --pre .
Or by installing from PyPI using:
pip install hightime
Examples
>>> from hightime import datetime
>>> from hightime import timedelta
>>> high_noon = datetime(
... year=1952,
... month=7,
... day=24,
... hour=12,
... minute=0,
... second=30,
... microsecond=0,
... )
>>> print(high_noon)
1952-07-24 12:00:30
>>> hesitation = timedelta(microseconds=10, femtoseconds=203456)
>>> print(hesitation)
0:00:00.000010000203456
>>> reaction = high_noon + hesitation
>>> print(reaction)
1952-07-24 12:00:30.000010000203456
>>> print(high_noon + high_noon)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'datetime' and 'datetime'
>>> print(hesitation * 2)
0:00:00.000020000406912
See the readthedocs page for more detailed examples and documentation.
License
Hightime is licensed under an MIT-style license.
See LICENSE for details about how hightime is licensed.
Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.
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 hightime-1.0.0.tar.gz.
File metadata
- Download URL: hightime-1.0.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
480d2a03e2c3ed44916d2406d40ab6d10a276ed7f101619fc3fcc1e00c46aacf
|
|
| MD5 |
cde2acb8e9410904eb435b337e2643fe
|
|
| BLAKE2b-256 |
25373466f0022ea7879f48c35b7869b83ccc76ed365f2e12f4cf48555252d76a
|
Provenance
The following attestation bundles were made for hightime-1.0.0.tar.gz:
Publisher:
publish.yml on ni/hightime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hightime-1.0.0.tar.gz -
Subject digest:
480d2a03e2c3ed44916d2406d40ab6d10a276ed7f101619fc3fcc1e00c46aacf - Sigstore transparency entry: 581442233
- Sigstore integration time:
-
Permalink:
ni/hightime@d33f3d2bd41b4c8fe7873cfed6d727d1118dcee3 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d33f3d2bd41b4c8fe7873cfed6d727d1118dcee3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hightime-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hightime-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba86d42976c36451b14e11c736e61f296f9f00dbb79c8488e18d70c6b2dbb395
|
|
| MD5 |
05d7a8c8bcc6f1a1870b706118b4cff8
|
|
| BLAKE2b-256 |
0af93b018f6eec88a35f3cce2103015cb1918b66cc8316ff5c2510ff1c19cb26
|
Provenance
The following attestation bundles were made for hightime-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on ni/hightime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hightime-1.0.0-py3-none-any.whl -
Subject digest:
ba86d42976c36451b14e11c736e61f296f9f00dbb79c8488e18d70c6b2dbb395 - Sigstore transparency entry: 581442235
- Sigstore integration time:
-
Permalink:
ni/hightime@d33f3d2bd41b4c8fe7873cfed6d727d1118dcee3 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d33f3d2bd41b4c8fe7873cfed6d727d1118dcee3 -
Trigger Event:
release
-
Statement type: