Metadata-Version: 2.4
Name: spicekit
Version: 0.1.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Dist: numpy>=1.24
Requires-Dist: pytest>=8 ; extra == 'test'
Requires-Dist: naif-leapseconds ; extra == 'test'
Requires-Dist: naif-de440 ; extra == 'test'
Requires-Dist: naif-earth-itrf93 ; extra == 'test'
Requires-Dist: naif-eop-high-prec ; extra == 'test'
Provides-Extra: test
Summary: Python bindings for spicekit: pure-Rust NAIF kernel readers (DAF/SPK/PCK/text kernels).
Author: Asteroid Institute
Author-email: Alec Koumjian <alec@b612foundation.org>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/B612-Asteroid-Institute/spicekit/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/B612-Asteroid-Institute/spicekit/issues
Project-URL: Repository, https://github.com/B612-Asteroid-Institute/spicekit

# spicekit (Python)

[![PyPI](https://img.shields.io/pypi/v/spicekit.svg)](https://pypi.org/project/spicekit/)
[![CI](https://github.com/B612-Asteroid-Institute/spicekit/actions/workflows/ci.yml/badge.svg)](https://github.com/B612-Asteroid-Institute/spicekit/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)

Python bindings for [`spicekit`](../spicekit), a pure-Rust reader for
NASA/NAIF SPICE kernel formats (DAF, SPK, PCK, text kernels). Independent
of the CSpice toolkit.

## Install

```bash
pip install spicekit
```

Development install (from the workspace root):

```bash
maturin develop --release --manifest-path crates/spicekit-py/Cargo.toml
```

## Usage

```python
import spicekit

spk = spicekit.NaifSpk("/path/to/de440.bsp")
state = spk.state(target=399, center=0, et=0.0)  # (x, y, z, vx, vy, vz)

pck = spicekit.NaifPck("/path/to/earth_latest_high_prec.bpc")
m = pck.sxform("J2000", "ITRF93", et=0.0)  # 6x6 state-transform matrix

code = spicekit.naif_bodn2c("EARTH")  # 399
name = spicekit.naif_bodc2n(399)      # "EARTH"
bindings = spicekit.naif_parse_text_kernel_bindings("/path/to/ids.tf")
```

## Surface

- `NaifSpk(path)`: `state`, `state_batch`, `state_batch_in_frame`, `segments`.
- `NaifPck(path)`: `euler_state`, `sxform`, `pxform`, `sxform_batch`,
  `pxform_batch`, `rotate_state_batch`, `segments`.
- `NaifSpkWriter(locifn)`: `add_type3`, `add_type9`, `write`.
- `naif_bodn2c(name)` / `naif_bodc2n(code)`: built-in NAIF body-code table.
- `naif_parse_text_kernel_bindings(path)`: parse `NAIF_BODY_NAME` ↔
  `NAIF_BODY_CODE` assignments from text kernels.

