Metadata-Version: 2.4
Name: brightdate
Version: 0.1.0
Summary: BrightDate — decimal-SI days since J2000.0 (Python reference slice)
Author: Digital Defiance
License: MIT
Project-URL: Homepage, https://brightdate.org
Project-URL: Documentation, https://github.brightdate.org/docs/papers/brightdate-specification
Project-URL: Repository, https://github.com/Digital-Defiance/brightdate-python
Project-URL: npm reference, https://www.npmjs.com/package/@brightchain/brightdate
Keywords: brightdate,time,j2000,tai,astronomy
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Dynamic: license-file

# brightdate-python

Python reference slice for [BrightDate](https://brightdate.org) — decimal SI days since the J2000.0 UTC label (`946_727_935_816` Unix ms → BD 0). Full semantics: [specification](https://github.brightdate.org/docs/papers/brightdate-specification). Multi-language reference: [`@brightchain/brightdate`](https://www.npmjs.com/package/@brightchain/brightdate).

**Repository:** [Digital-Defiance/brightdate-python](https://github.com/Digital-Defiance/brightdate-python)

## Install

```bash
pip install brightdate
```

BrightVision dev (submodule):

```bash
git submodule update --init brightdate-python
pip install -e brightdate-python
```

## Example

```python
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

```bash
pip install -e ".[dev]"
pytest -q
```

## Publish

See [PUBLISH.md](./PUBLISH.md).

## Consumers

- [BrightVision](https://github.com/Digital-Defiance/BrightVision) — `bright_vision_core`, Test Lab, `btime` / bgpucap timing
- [brightdate-rust](https://github.com/Digital-Defiance/brightdate-rust) — CLI `btime`
