tet-py
Python bindings for Tetration — mmap-friendly .tet tensors and the JSON/TOML query engine.
| Install | pip install tet-py → import tet |
| Docs | docs.tetration.sh/python |
| Rust core | tetration (linked at build time) |
| CLI | tet binary from the main repo |
Do not pip install tetration — that PyPI name is unrelated math code.
Quick start
pip install tet-py
python -c "import tet; print(tet.__version__, tet.core_version())"
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 for full-width raw slabs)
z = f.transform.to_numpy.zscore("temperature") # transform → ndarray
More examples: Python quick start · operations · NumPy
Convert
tet.convert writes one .tet from a foreign file. .npy, multi-member .npz, and .csv / .tsv are in the core wheel. Other formats are optional extras: tet-py[h5], [netcdf], [zarr], [parquet], or [convert] for all of them.
| Extra | What it imports |
|---|---|
| (core) | .npy (one dataset), .npz (every member), .csv / .tsv (numeric + category text columns) |
h5 |
HDF5 datasets, groups as parent/child names |
netcdf |
NetCDF variables, including groups |
zarr |
Zarr v2 and v3 directory stores |
parquet |
Parquet numeric columns and UTF-8 category columns |
Compared with Rust tet convert: Python does not apply CF scale/offset, chunks the whole array unless you pass chunk_shape, and can read codecs the Rust importer skips when the extra library can decode them. Columns that are not layout-v1 numeric (or category text) are omitted.
Export
tet.export (and TetFile.export) writes a .tet to HDF5, NetCDF, or Zarr. Same optional extras as convert ([h5], [netcdf], [zarr], or [export] for those three). Dense numeric datasets only; carries dim_names and basic string attrs when present. Values are densified via read_numpy — prefer Rust tet export when you need native HDF5/NetCDF or chunk-preserving Zarr.
Packages
tet.open("pkg.tet.d") reads the generation named by CURRENT (packed.tet). tet.ingest copies a sealed .tet into staging, and tet.publish seals those parts and updates CURRENT. See docs/operations.md.
Documentation
| Topic | Where |
|---|---|
| Install, API, NumPy sinks | docs.tetration.sh/python |
| Query ops (local mirror) | docs/operations.md |
| Release notes | CHANGELOG.md |
| Format + query wire | docs.tetration.sh · tetration repo |
| Roadmap | docs.tetration.sh/roadmap |
Develop
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). Fixtures: tests/fixtures/.
License
MIT OR Apache-2.0, same as tetration.
Metadata
Release files for tet-py 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tet_py-0.2.3.tar.gz | 56.5 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tet_py-0.2.3-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| tet_py-0.2.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| tet_py-0.2.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| tet_py-0.2.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.11 | abi3 | macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64 | Details |
Total release size: 7.0 MB
Release files / tet_py-0.2.3.tar.gz
| Download URL | tet_py-0.2.3.tar.gz |
|---|---|
| Size | 56.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e9c7864c758900a4ee9fd55089facedbc2ef28ae0b162becb84c9d6aeae51e4
|
|
BLAKE2b-256 checksum How to use checksums |
c9c3518804692fbd689fc68bf839c4a90fea6ed16147ed532b2d50131d001cbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / tet_py-0.2.3-cp311-abi3-win_amd64.whl
| Download URL | tet_py-0.2.3-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f1f52cd37f2f11c683c7a65ba8b620bfb9e9a1f25ab7d9f5c2187ec134549f9a
|
|
BLAKE2b-256 checksum How to use checksums |
e70a4239cd2c7b1b51e3132a62694c5850f8e41381c56b149a6b6d05b89a8b0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / tet_py-0.2.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tet_py-0.2.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fea96903740d53bc496a73c82445758eabb13a010ddb6c34c2e81cc26610d1f2
|
|
BLAKE2b-256 checksum How to use checksums |
153ed90ac0e62b408c044f5ffd1bec5068e283dda04bfb838a91a1044c6934ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / tet_py-0.2.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | tet_py-0.2.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
30e227692a1d653e0b264afd06f8dd753d7c79892307faf9817c37d21853b886
|
|
BLAKE2b-256 checksum How to use checksums |
8ff9046d5bf92e03a5bf276455375a7756a66a74f60452f8b860adf46b03858a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / tet_py-0.2.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | tet_py-0.2.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
26b93413c1eeb34c4ef86b2c5edfdd03cc450a78be509d1ddf4f76b479d461ae
|
|
BLAKE2b-256 checksum How to use checksums |
238f470738f9cbb226d16e625bd4891ea1804e9aac215dd59d222c10d4f5961e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|