Library / SDK
google/tensorstore avatar
google/tensorstore

TensorStore for Large Multi-Dimensional Array Data

Library for reading and writing large multi-dimensional arrays.

1,552 stars151 forksC++NOASSERTION

At a glance

What is it?
TensorStore gives C++ and Python applications a common interface for reading, writing, indexing, and modifying large n-dimensional arrays across files, memory, and remote object stores. It is most relevant when an application needs composable array operations without building separate storage paths for every backend.
Who is it for?
TensorStore is a sensible choice for Python or C++ systems that process large n-dimensional data through zarr, N5, memory, files, or remote object stores, especially where composable indexing and transactional writes matter. It is less suitable for small in-memory arrays that NumPy alone can handle or for storage models outside the formats and backends listed by the project.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 7, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • google/tensorstore1,552 ★ · +5
Star history
Repository2026-10-162026-11-07
google/tensorstore1.5k1.6k

5 Stars in the last 22 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Why TensorStore Exists for Array-Centric Applications

TensorStore addresses a specific storage problem: large n-dimensional arrays are commonly split into chunks, represented by established container formats, and placed in environments with very different access costs. A local array, a file on a network filesystem, and an object in Google Cloud Storage may all need slicing, transposition, writing, and consistent access, but handling each storage mechanism directly can spread indexing and I/O logic throughout an application.

The library presents one interface for these operations in C++ and Python. Its documented formats include zarr and N5, while its supported storage systems include local and network filesystems, Google Cloud Storage, Amazon S3-compatible object stores, HTTP servers, and memory. This makes it relevant to scientific computing, geospatial processing, machine-learning data preparation, and other software that treats multidimensional chunks as a primary data model. The repository does not describe TensorStore as a replacement for ordinary in-memory computation. Its purpose is storage and manipulation at a scale where chunk layout, lazy access, remote I/O, or coordinated writes affect application design.

The core advantage is uniformity without hiding the storage boundary. An application can choose a backend and array representation while retaining the same general API for array access and transformation. That does not eliminate backend configuration, but it avoids maintaining a separate high-level data access implementation for each environment.

TensorStore Indexing, Virtual Views, and Chunked Data Flow

According to the README, TensorStore provides "advanced, fully composable indexing operations and virtual views." A virtual view describes an operation over an existing array without requiring the result to be stored as an independent array. The README does not show the API calls needed to construct a view, so the exact evaluation and caching behavior should be taken from the linked API documentation rather than inferred here.

The data path is centered on a multidimensional array abstraction. Selecting, slicing, or composing an index produces array-shaped access backed by the underlying storage representation. The README also states that TensorStore supports read caching, which is relevant when repeated operations address overlapping regions. It further provides transactions and optimistic concurrency, allowing multi-process or multi-machine access to be coordinated around conflicts rather than reduced to independent last-writer behavior.

The API is asynchronous. For remote stores, requests can be expressed without requiring each network operation to follow the same synchronous sequence throughout the application. The README claims high-throughput access for high-latency storage, but it gives no benchmark results. The defensible technical point is architectural: asynchronous operations and caching give remote I/O its own execution model. Actual latency, throughput, and memory use still depend on chunk selection, request concurrency, backend, and access pattern.

Storage Backends and Transaction Boundaries

TensorStore separates the array interface from its storage location. The documented backends span in-memory data, local and network filesystems, Google Cloud Storage, Amazon S3-compatible object stores, and HTTP servers. Zarr and N5 provide two of the supported array formats. That combination is useful when a workflow needs more than local disk access, although it also means an adopter must configure both the array representation and its underlying store.

The README describes transactions with strong atomicity, isolation, consistency, and durability guarantees. It also describes safe coordination through optimistic concurrency. In practical terms, those statements indicate that TensorStore has a defined consistency model for writes rather than treating storage as a collection of unrelated chunk replacements. The README does not specify transaction duration, retry policy, supported operation mix, or behavior for every backend. Those details matter when deciding whether the library matches an application's durability requirements.

The asynchronous API should not be interpreted as permission to ignore synchronization. Optimistic concurrency still requires handling conflicts when concurrent writers target overlapping data. Likewise, using an HTTP server as a backend does not make that server an array-aware service. The README does not provide backend setup examples, so driver-specific configuration remains an adoption task documented outside the README.

Installing TensorStore and Checking the Python Package

The README gives a direct installation command for the Python package. The repository metadata requires Python 3.11 or newer:

bash
pip install tensorstore

The command installs `tensorstore` from PyPI. Its declared Python dependencies are `numpy>=1.22.0` and `ml_dtypes>=0.5.0`, which pip resolves as part of the installation. The source build is configured through `pyproject.toml` and `setup.py`; `setup.py` invokes Bazel through the included `bazelisk.py` wrapper, but the README's PyPI command is the documented Python starting point.

After installation, the README directs users to the Python tutorials and API documentation for opening arrays and composing operations. It does not include those examples. C++ users can inspect `CMakeLists.txt`, `BUILD.bazel`, and the example sources in the repository, but the README does not provide a confirmed C++ build command for a particular platform.

Where TensorStore Is a Poor Fit

TensorStore is the wrong level of abstraction for a small array that already fits comfortably in memory and needs no special storage format. In that case, the dependency surface introduced by TensorStore may add configuration and asynchronous behavior without solving a material problem. The package depends on NumPy and `ml_dtypes`, while its stated purpose is persistence and manipulation of large arrays rather than basic numeric calculation.

There is also a mismatch when application data has no relationship to the documented array formats and storage backends. The README does not claim arbitrary database records, ordinary files, or every object-store protocol are supported. An adopter should not infer that opening an HTTP URL automatically creates a writable, transactional array. The array representation, driver, credentials, operation semantics, and backend capabilities must line up.

C++ adoption can also be less direct than Python adoption. The repository layout confirms C++ examples, CMake configuration, and Bazel files, but the repository files do not include a documented end-to-end build command for a specific platform. Python users receive an explicit PyPI command. C++ users must consult the project documentation for supported toolchain and dependency expectations.

Strong transactional language should also be checked against the actual write pattern. TensorStore documents transactions and optimistic concurrency, but the README does not explain whether a proposed workflow consists of small independent chunk writes, large multi-region commits, or repeated conditional retries. Those workloads should be compared with the detailed API and backend documentation before selection.

TensorStore Compared with Direct NumPy and Backend I/O

The closest built-in alternative for straightforward Python array work is NumPy, which TensorStore already uses as a Python dependency. It has a simpler storage model and avoids TensorStore's array-opening, driver, cache, and transaction configuration. For modest datasets, that simplicity can be the better choice.

Direct backend I/O is the other meaningful alternative. An application could use NumPy for computation while separately implementing file or object-store requests, chunk naming, metadata handling, indexing, and concurrency control. This approach leaves the application in full control of its storage protocol, but every backend and consistency rule becomes application code. TensorStore instead centralizes those concerns behind a common array interface and supports multiple formats and stores.

The difference is therefore not simply speed. Direct I/O can be efficient when its storage model is fixed and known. TensorStore is more relevant when the same application must address several storage environments, compose multidimensional views, coordinate concurrent writers, or work with remote data asynchronously. The trade-off is that direct code avoids a library layer at the cost of implementing and maintaining behavior that TensorStore models. The README does not provide enough detail for a universal performance comparison.

Maintenance Signals, Releases, and Apache 2.0 Implications

The repository is not archived, and its last push was on 2026-10-15. That is a recent development signal, but the repository has no GitHub releases. Consequently, there is no release cadence stated in the README. Absence of GitHub releases does not by itself establish that versioning or package publishing has stopped. Python installation points to the `tensorstore` package on PyPI, while `pyproject.toml` uses `setuptools_scm` for a dynamic version.

The README and `pyproject.toml` both identify Apache License 2.0, and the README includes the Apache 2.0 license text. The repository's external license classification is inconsistent with that metadata and indicates that GitHub could not classify the license as an ordinary supported type. This is not legal advice, but it is a concrete procurement issue: reviewers should inspect the repository's `LICENSE` file and confirm the exact terms applicable to the version they obtain, especially for organizations with automated license-compliance checks.

Upgrade planning should account for Python compatibility, native components, and backend configuration. The package metadata requires Python 3.11 or newer, and the source setup invokes Bazel. The README does not document a TensorStore upgrade procedure, migration policy, deprecation timeline, or rollback process. Teams adopting it should pin their package version and review project documentation for changes to formats, drivers, and transaction behavior.

Editorial conclusion

TensorStore is a sensible choice for Python or C++ systems that process large n-dimensional data through zarr, N5, memory, files, or remote object stores, especially where composable indexing and transactional writes matter. It is less suitable for small in-memory arrays that NumPy alone can handle or for storage models outside the formats and backends listed by the project. Before adoption, inspect the `LICENSE` file because the repository classification and package metadata describe the licensing differently, then verify the required storage drivers, Python version, and transaction semantics for the target workload.

Frequently asked questions

How do I install TensorStore for Python?

Run `pip install tensorstore`. The package metadata requires Python 3.11 or newer and declares `numpy>=1.22.0` and `ml_dtypes>=0.5.0` as dependencies.

Which array formats and storage backends does TensorStore support?

The README lists zarr and N5 array formats. Documented storage systems include local and network filesystems, Google Cloud Storage, Amazon S3-compatible object stores, HTTP servers, and in-memory storage.

Does TensorStore support concurrent writes?

The README states that TensorStore supports transactions with ACID guarantees and safe access from multiple processes and machines through optimistic concurrency. Detailed concurrency and retry behavior must be checked in the API documentation.

Official sources

  1. google/tensorstore on GitHub
  2. Issues
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/google-tensorstore.svg)](https://hysenlabs.com/projects/google-tensorstore)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/google-tensorstore.svg)](https://hysenlabs.com/projects/google-tensorstore)

Was this useful?