BrightDate — decimal-SI days since J2000.0 (Python reference slice)
Project description
brightdate-python
Python reference slice for BrightDate — decimal SI days since the J2000.0 UTC label (946_727_935_816 Unix ms → BD 0). Full semantics: specification. Multi-language reference: @brightchain/brightdate.
Repository: Digital-Defiance/brightdate-python
Install
pip install brightdate
BrightVision dev (submodule):
git submodule update --init brightdate-python
pip install -e brightdate-python
Example
from brightdate import J2000_UNIX_MS, bd_from_unix_ms, format_bd_scalar, from_iso, now, to_iso
assert J2000_UNIX_MS == 946_727_935_816
assert abs(from_iso("2000-01-01T11:58:55.816Z")) < 1e-12
print(format_bd_scalar(now()))
print(to_iso(0.0)) # 2000-01-01T11:58:55.816Z
v0.1 scope
| Included | Planned (npm parity) |
|---|---|
Epoch constants, Unix↔BD, now() |
Leap-second table, TAI↔UTC |
format_bd_scalar, millidays, ETC |
BrightInstant, archival types |
parse_bd_bounds (btime stderr) |
Serialization, astronomy helpers |
from_iso / to_iso (UTC label) |
Leap-second :60 in to_iso |
Tests
pip install -e ".[dev]"
pytest -q
Publish
See PUBLISH.md.
Consumers
- BrightVision —
bright_vision_core, Test Lab,btime/ bgpucap timing - brightdate-rust — CLI
btime
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 brightdate-0.1.0.tar.gz.
File metadata
- Download URL: brightdate-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dcd3c3aec2ef5bf6a3e6e03fbe0b6166432093a4bab708929ecc87fce787573
|
|
| MD5 |
c3aa7fcc8b25c9950982dddb6057e801
|
|
| BLAKE2b-256 |
271f37064bf5a7bec3bf29750d56e03e68720cc681bc4c055a8e0c6834e35261
|
Provenance
The following attestation bundles were made for brightdate-0.1.0.tar.gz:
Publisher:
publish.yml on Digital-Defiance/brightdate-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brightdate-0.1.0.tar.gz -
Subject digest:
7dcd3c3aec2ef5bf6a3e6e03fbe0b6166432093a4bab708929ecc87fce787573 - Sigstore transparency entry: 1701065117
- Sigstore integration time:
-
Permalink:
Digital-Defiance/brightdate-python@70db3ac82c22d433b5fe20fe1d34a8592af38404 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Digital-Defiance
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@70db3ac82c22d433b5fe20fe1d34a8592af38404 -
Trigger Event:
push
-
Statement type:
File details
Details for the file brightdate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: brightdate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c48d040c504f8da9c5bf9ec4c762feea358c976bb9824d8be79e3e831b7b8eb
|
|
| MD5 |
139460b2d7c6148598de810fcee18b07
|
|
| BLAKE2b-256 |
d5916985106c4aeb23c35d41e8b9a3eae80b8371d5344b5288e46a0a00ceb148
|
Provenance
The following attestation bundles were made for brightdate-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Digital-Defiance/brightdate-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brightdate-0.1.0-py3-none-any.whl -
Subject digest:
4c48d040c504f8da9c5bf9ec4c762feea358c976bb9824d8be79e3e831b7b8eb - Sigstore transparency entry: 1701065149
- Sigstore integration time:
-
Permalink:
Digital-Defiance/brightdate-python@70db3ac82c22d433b5fe20fe1d34a8592af38404 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Digital-Defiance
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@70db3ac82c22d433b5fe20fe1d34a8592af38404 -
Trigger Event:
push
-
Statement type: