Metadata-Version: 2.4
Name: tet-py
Version: 0.2.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering
Requires-Dist: numpy>=2.0
Requires-Dist: h5py>=3.10 ; extra == 'convert'
Requires-Dist: netcdf4>=1.6 ; extra == 'convert'
Requires-Dist: zarr>=2.16 ; extra == 'convert'
Requires-Dist: pandas>=2.0 ; extra == 'convert'
Requires-Dist: pyarrow>=14.0 ; extra == 'convert'
Requires-Dist: pandas>=2.0 ; extra == 'csv'
Requires-Dist: pytest>=8.0 ; extra == 'dev'
Requires-Dist: maturin>=1.7 ; extra == 'dev'
Requires-Dist: mypy>=1.13 ; extra == 'dev'
Requires-Dist: numpy>=2.0 ; extra == 'dev'
Requires-Dist: h5py>=3.10 ; extra == 'h5'
Requires-Dist: netcdf4>=1.6 ; extra == 'netcdf'
Requires-Dist: pyarrow>=14.0 ; extra == 'parquet'
Requires-Dist: zarr>=2.16 ; extra == 'zarr'
Provides-Extra: convert
Provides-Extra: csv
Provides-Extra: dev
Provides-Extra: h5
Provides-Extra: netcdf
Provides-Extra: parquet
Provides-Extra: zarr
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Summary: Python bindings for Tetration .tet files and the query engine
Keywords: tetration,tensor,mmap,zarr,hdf5,netcdf
Author-email: AHurowitz <latkaindustries@gmail.com>
License: MIT OR Apache-2.0
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://docs.tetration.sh/python/
Project-URL: Homepage, https://docs.tetration.sh/python/
Project-URL: Repository, https://github.com/Latka-Industries/tet-py

# tet-py

[![PyPI](https://img.shields.io/pypi/v/tet-py.svg)](https://pypi.org/project/tet-py/)
[![Docs](https://img.shields.io/badge/docs-docs.tetration.sh-blue)](https://docs.tetration.sh/python/)
[![CI](https://github.com/Latka-Industries/tet-py/actions/workflows/ci.yml/badge.svg)](https://github.com/Latka-Industries/tet-py/actions/workflows/ci.yml)
[![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue)](LICENSE-MIT)

Python bindings for [**Tetration**](https://github.com/Latka-Industries/tetration) — mmap-friendly `.tet` tensors and the JSON/TOML query engine.

| | |
| --- | --- |
| **Install** | [`pip install tet-py`](https://pypi.org/project/tet-py/) → `import tet` |
| **Docs** | [docs.tetration.sh/python](https://docs.tetration.sh/python/) |
| **Rust core** | [`tetration`](https://crates.io/crates/tetration) (linked at build time) |
| **CLI** | [`tet`](https://github.com/Latka-Industries/tetration) binary from the main repo |

Do **not** `pip install tetration` — that PyPI name is unrelated math code.

## Quick start

```bash
pip install tet-py
python -c "import tet; print(tet.__version__, tet.core_version())"
```

```python
import tet

with tet.open("data.tet") as f:
    print(f.mean("temperature"), f.quantile("temperature", 0.5))
    arr = f.read_numpy("temperature")                 # ram (memmap when single-chunk raw)
    z = f.transform.to_numpy.zscore("temperature")  # transform → ndarray
```

More examples: [Python quick start](https://docs.tetration.sh/python/quick-start) · [operations](https://docs.tetration.sh/python/operations) · [NumPy](https://docs.tetration.sh/python/numpy)

## Documentation

| Topic | Where |
| ----- | ----- |
| Install, API, NumPy sinks | [docs.tetration.sh/python](https://docs.tetration.sh/python/) |
| Query ops (local mirror) | [`docs/operations.md`](docs/operations.md) |
| Release notes | [`CHANGELOG.md`](CHANGELOG.md) |
| Dev / agent notes | [`docs/HANDOFF.md`](docs/HANDOFF.md) |
| Format + query wire | [docs.tetration.sh](https://docs.tetration.sh) · [tetration repo](https://github.com/Latka-Industries/tetration) |
| Roadmap | [docs.tetration.sh/roadmap](https://docs.tetration.sh/roadmap) |

## Develop

```bash
uv sync --extra dev
mise run develop          # or: uv run maturin develop
uv run pytest -q
uv run mypy python/tet
```

Requires Python **3.11+** and Rust **1.95+** ([`.mise.toml`](.mise.toml)). Fixtures: `tests/fixtures/`.

## License

**MIT OR Apache-2.0**, same as [tetration](https://github.com/Latka-Industries/tetration).

