Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.8.3 instead.

tet-py

PyPI Docs CI Python License

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

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.

src may be s3://bucket/object.ext (full download, then the same importer) or an s3:// Zarr v2/v3 prefix (each chunk is fetched as the zarr library reads it). Credentials stay in TETRATION_S3_*.

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. tet.pack(package, "out.tet") copies that sealed image to a standalone file; pass remove_package=True to delete the .tet.d after a verified copy.

For an S3-compatible backend:

from tet import S3Store

store = S3Store.connect(endpoint="http://127.0.0.1:9000", bucket="…",
                        access_key_id="…", secret_access_key="…", prefix="demo")
store.ingest("part.tet", session_id="s0")
store.publish(["part"])
f = store.open("current")  # pin; later publish does not retarget f
# or, with TETRATION_S3_* set: tet.open("s3://bucket/demo")

Endpoint and credentials are arguments or TETRATION_S3_* (not in the URI). tet.open("s3://bucket/prefix") range-reads the pinned package. S3Store.open still downloads packed.tet. See docs/operations.md.

Job files

tet.run_job("job.toml") runs a stock tet run job through the Rust executor (same as the CLI). Returns the JobReport dict; pass dry_run=True to plan only. Relative paths resolve against the job file's directory (or root=).

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

mise run sync             # uv sync --extra dev --extra convert
mise run develop          # maturin develop
mise run test             # pytest -q
mise run mypy
mise run check            # fmt + clippy + mypy + pytest

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.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tet-py 0.8.2
File Size Uploaded Provenance Actions
tet_py-0.8.2.tar.gz 76.7 kB Without provenance Details for tet_py-0.8.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tet-py 0.8.2
File Actions
tet_py-0.8.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for tet_py-0.8.2-cp311-abi3-win_amd64.whl
tet_py-0.8.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for tet_py-0.8.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
tet_py-0.8.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for tet_py-0.8.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
tet_py-0.8.2-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 11.0+ ARM64, macOS 10.12+ x86-64 Details for tet_py-0.8.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 31.7 MB

Release files / tet_py-0.8.2.tar.gz

Download URL tet_py-0.8.2.tar.gz
Size 76.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d4c652c3276c628a767c407cfcb802206f49aab57917baf758a7360e77c1f1fc
BLAKE2b-256 checksum
How to use checksums
d3217318e02d3e3fde977eebd41223cee7c50ef90e670d37caf72dc1a384b6d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.8.2-cp311-abi3-win_amd64.whl

Download URL tet_py-0.8.2-cp311-abi3-win_amd64.whl
Size 5.8 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fa5fc46a98634f675ea32a4cef8da18b81c03355f171f88af23a7a9b3b253439
BLAKE2b-256 checksum
How to use checksums
6d5b25b040bd72cc1b4611b8f33d968083132f824b68715b0288edfcb385a686
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.8.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tet_py-0.8.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1b5731e3b24836b74b8e139c2f797df3e40162067f3c1def3540c4bea29d67b7
BLAKE2b-256 checksum
How to use checksums
c35bc69bd7a6bc421400a07a2ea5bbade42c857734bab43fcc2f49979c8c3c55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.8.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL tet_py-0.8.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.7 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
3c52ada5cbe02ab5f12db099f21082bdaa1704ee07dc03b5c17f6947461627a8
BLAKE2b-256 checksum
How to use checksums
aeef3ef973b977f0a504182e0a0a91840afbe1de6a92fe9d909b3fa04a40bca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.8.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL tet_py-0.8.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 12.2 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
3704ece9f951b087de57d53431cfc817b22ed57fda6cc8744b558b803d9637b2
BLAKE2b-256 checksum
How to use checksums
9a8719408843efc6067286eb4b933c1fbe0725d0ebf095c8af089d6aff8a331e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for tet-py 0.8.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.2 This release

5 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page