Installation

zarr-vectors requires Python 3.11 or later; the tests run on 3.11 and 3.12. It reads and writes Zarr v3 stores only.

pip install zarr-vectors

This installs zarr>=3.0, numpy>=1.24 and numcodecs>=0.12, and gives you reading, writing and validation for all seven geometry types. The package installs no command-line tools.

Optional extras

Install an extra with pip install "zarr-vectors[<extra>]".

Extra

Adds

See

draco

DracoPy, needed to read Draco-compressed meshes

obstore (alias cloud)

Amazon S3, Google Cloud Storage and Azure through obstore

Cloud stores

fsspec

The same clouds through s3fs, gcsfs and adlfs

Cloud stores

icechunk

The Icechunk transactional store; needs Python 3.12 or later

Cloud stores

gpu

cupy (cupy-cuda12x) device arrays; Linux only

GPU arrays

gpu-codecs

gpu plus nvCOMP, to decompress zstd cells on the device

GPU arrays

gpu-io

gpu plus kvikio, to read local files into device memory

GPU arrays

all

draco, obstore, fsspec and icechunk

all leaves out the GPU extras (gpu, gpu-codecs, gpu-io), because they are tied to a CUDA version. In a conda environment, install cupy from conda-forge instead of using [gpu], and kvikio from the rapidsai channel instead of using [gpu-io].

Octree-sharded stores (the zarr_octree_sharding codec) need the zarr-octree package, which is not on PyPI:

pip install "git+https://github.com/Andrew-Keenlyside/zarr-octree"

A store that is not octree-sharded never imports it. See Sharding.

Format converters (LAS, PLY, TRK, SWC, OBJ and others) and the zvtools command are in the separate package zarr-vectors-tools; see Ingesting other formats.

Development install

git clone https://github.com/AllenInstitute/zarr-vectors-py.git
cd zarr-vectors-py
pip install -e ".[all,dev]"
pip install -r docs/requirements-docs.txt   # to build the docs
pytest tests/

dev adds pytest, ruff and mypy, and the schema tooling one test module uses. The tests need no network access or external data.

Check the install

import zarr_vectors

print(zarr_vectors.__version__)

This prints the installed version. The version comes from the release’s git tag, so a development checkout prints a .devN+g<hash> version.

Dependency notes

Zarr 2 cannot read these stores, because the layout uses Zarr v3’s variable-length bytes codec. This package does not open Zarr v2 stores; write the data into a new store from its source.

Importing zarr_vectors silences zarr’s UnstableSpecificationWarning about variable-length dtypes, which the format uses on purpose.