Skip to main content

Fast binary N-tensor message format for scientific data

Project description

Tensogram Python Bindings

Python bindings for the Tensogram N-tensor message format.

Native extension built with PyO3 + maturin. Supports NumPy arrays, async I/O, and GIL-free operation on free-threaded Python (3.13t / 3.14t).

Installation

pip install tensogram
# or, with the xarray and Zarr backends:
pip install tensogram[all]

Usage

import numpy as np
import tensogram

data = np.random.randn(100, 200).astype(np.float32)
msg = tensogram.encode(
    {"version": 3},
    [(
        {"type": "ntensor", "shape": [100, 200], "dtype": "float32",
         "compression": "szip"},
        data,
    )],
)
result = tensogram.decode(msg)
arr = result.objects[0][1]   # numpy array

Features

  • NumPy integration across every supported dtype (float / complex / int / uint, plus bitmask and bfloat16)
  • Sync and async file APIs (TensogramFile / AsyncTensogramFile)
  • GIL-free parallel encode / decode on free-threaded Python
  • Partial-range decode (decode_range)
  • Full codec support: szip, zstd, lz4, blosc2, zfp, sz3
  • Validation (tensogram.validate, tensogram.validate_file)
  • GRIB / NetCDF conversion (when the wheel is built with the matching feature)

Documentation

License

Copyright 2026- ECMWF. Licensed under Apache-2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tensogram-0.17.0-cp314-cp314t-manylinux_2_39_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.39+ x86-64

tensogram-0.17.0-cp314-cp314t-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

tensogram-0.17.0-cp314-cp314-manylinux_2_39_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

tensogram-0.17.0-cp314-cp314-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

tensogram-0.17.0-cp313-cp313t-manylinux_2_39_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.39+ x86-64

tensogram-0.17.0-cp313-cp313t-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

tensogram-0.17.0-cp313-cp313-manylinux_2_39_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

tensogram-0.17.0-cp313-cp313-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tensogram-0.17.0-cp312-cp312-manylinux_2_39_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

tensogram-0.17.0-cp312-cp312-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tensogram-0.17.0-cp311-cp311-manylinux_2_39_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

tensogram-0.17.0-cp311-cp311-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file tensogram-0.17.0-cp314-cp314t-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp314-cp314t-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8241f20c295a7bf26ab682848184408320c0001edc88ff16ec4ef161a43924d1
MD5 2f57952ea1883a7dd256744930e478a7
BLAKE2b-256 5c3c3fa81e5668c32e1408077af198044bce24b1d23369f33c7d019ee1a5db4f

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a39e386f66b62ed7d9b3674f00a13e75f2226f292203ba88505ac000f87b0b71
MD5 a04e0d6f3677c4bce629a1d2c6576a94
BLAKE2b-256 d8b2b63fed4035ca1e5f6ed70db73e22f556805960c86b2caf4c56547dc6bd90

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 5cc19b5d6f3708563b218f5d4572e4f074ffde23522ee28f82bef214151dbe2e
MD5 0b87724964073c9efaab653b1a7d9c3f
BLAKE2b-256 926dc8bbd22a4ac83843026a61c2330bcb004465a109617c07f479e3f7fd2d67

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b4965b143b15d3c230e6e01166e2cadf0ab885be6b6414aa8eeec78c7d7889c
MD5 5050b86ff0f102fc8b6b7607e83d5f98
BLAKE2b-256 24bd8bc01f34df52a6e0830c5e9a158ecf4b2b98513afccd5acf758bc257f417

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp313-cp313t-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp313-cp313t-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 f79922fbebe47b074af414c3c8927895f2b5e2007956a280f91d3734fe7a2ad3
MD5 a4959dd5dfee8fe3d1a0b73c90e59263
BLAKE2b-256 fccadf86b84ab8f1f87f2a0839b45d7e0b387e68dd57db55fa6fe6658342e2c1

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp313-cp313t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9135e6c9834fc227f797c3a6571a84262c13f32ab7fd49ccd26f59bf306c5b13
MD5 83b3c4703da767a4327a871d04fb7386
BLAKE2b-256 818ce90d4a4f4d40b4a505f77b5daaa9814fc63f898bce2a9ba243ec74932b44

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7caa84c75fbb2e4db0a5f3d0819f768705f6d72b42630f79dd76e09cf33bf543
MD5 501b0c813a4753895ca84fda1d48585d
BLAKE2b-256 5595ee49edab75aea065cc8ef5321df644f444d90d1e0cafd67840bf55270bcb

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c85f427b26365039e4c5526921b01030ea2f67e31d8a56f437c922de1c06b0f1
MD5 05e2e9571f96044b0f03f7dc3d3c0241
BLAKE2b-256 d9c1f905f98bb0fe026cb108fa332002556f9a9de746def625d4d3a94f70b334

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 4d32b2f0e4a27dd5d4b6170949536a3f619c1c748fa84eb71ef7fcad7742be3d
MD5 34e53f2aeddd66dc419066863630ad6e
BLAKE2b-256 63d83746fe53d92b5f07ec65aed4ca20fe961a8e30f12565c74fba9e17987d76

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8eed111cf6cd89327310b7675c9105c5c7fae7a2780c290731e4361ffe451901
MD5 68a4a567c79c6e018cad453cfef15763
BLAKE2b-256 d1800b12b5fad4c12545891f0b6016eae0859f6995461f7e25b3902a8e7ce1fc

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 60da0101d25500d6beeeff70e5c865c4741f64870f0341b799632a663b966017
MD5 8e4c90e9303c1a40b3b6a401e80132c9
BLAKE2b-256 05577313992c2bf456f31d0428b6b60932f7180d08939e02d7469fac6a37e6d5

See more details on using hashes here.

File details

Details for the file tensogram-0.17.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensogram-0.17.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15190b9c633c51f9dfb9acc223cc34bc9f2bca81f82e99ad43874a3597f16d19
MD5 35565f4b7b605dd0736a97f2ab20777c
BLAKE2b-256 446130e9b91a3275ee966a270900f291deacab5cf0482a48a81617217b4fce52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page