Registry / data / xarray-tensorstore

xarray-tensorstore

JSON →
library0.3.0pypypi✓ verified 80d ago

Provides xarray backends for reading and writing N-dimensional arrays via TensorStore, enabling distributed and chunked access to Zarr, N5, and other stores. Current version: 0.3.0, release cadence: irregular.

pip install xarray-tensorstore
INSTALL
IMPORT
SIG · XARRAY-TENSORSTORE
X
xarray-tensorstore
datapythonv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

open_zarr
from xarray_tensorstore import open_zarr
from xarray.tensorstore import TensorStoreBackend
open_concatenated_zarrs
from xarray_tensorstore import open_concatenated_zarrs
read
from xarray_tensorstore import read

Open and write Zarr datasets using the TensorStore backend.

import xarray as xr import os # Open a TensorStore-backed Zarr store store_url = '/tmp/test.zarr' ds = xr.open_zarr(store_url, backend='tensorstore') print(ds) # Write with TensorStore backend ds = xr.Dataset({'var': (('x',), [1,2,3])}) ds.to_zarr(store_url, backend='tensorstore')
Debug
Known issues
gotchaThe tensorstore backend requires explicit specification via 'backend' keyword. Without it, xarray defaults to zarr-python backend.
fix
Always include backend='tensorstore' in open_zarr() or to_zarr() calls.
affects: 0.1.0+
breakingIn version 0.3.0, the import path changed from xarray.contrib.tensorstore to xarray.tensorstore. Existing code using the old import will break.
fix
Use 'from xarray.tensorstore import TensorStoreBackend' instead of 'from xarray.contrib.tensorstore import ...'
affects: 0.3.0
deprecatedThe 'tensorstore_kwargs' argument in open_zarr is deprecated in favor of passing kwargs via 'backend_kwargs'.
fix
Use backend_kwargs={'open': {...}} instead of tensorstore_kwargs={'open': {...}}
affects: 0.2.0 - 0.3.0
Upgrade
Version history
0.3.0latest on PyPI · released Oct 31, 2025
Audit
Dependencies
xarrayrequiredCore dependency for xarray integration
tensorstorerequiredRequired for TensorStore I/O backends
Agent activity
44 hits · last 30 days
node
38
OpenAI (training)
1
Resources
xarray-tensorstore — pip install xarray-tensorstore · libregistry