zarr_vectors

zarr-vectors: Python utilities for the Zarr Vectors (ZV) format.

Cloud-native storage for points, lines, streamlines, graphs, and meshes built on Zarr v3.

The top-level package re-exports the Data API surface, so zarr_vectors.open is zarr_vectors.api.open. Those names are documented on Data API; zarr_vectors.building on Building stores.

The names below exist only at the top level and describe the installed package. zarr_vectors.__version__ is the package version and zarr_vectors.__api_version__ the (major, minor) API version that require_api() compares against. zarr_vectors.concurrency_contract is zarr_vectors.building.concurrency_contract().

zarr_vectors.stability(module)[source]

Which tier module (or anything under it) is in.

Parameters:

module (str) – A dotted module name, e.g. "zarr_vectors.core.arrays", or a dotted name exported from one, e.g. "zarr_vectors.api.Dataset".

Return type:

Literal[‘supported’, ‘internal’, ‘undecided’]

A top-level name is supported if listed in zarr_vectors.__all__, otherwise internal.

Raises:

KeyError – If nothing in the manifest covers it — which means a module was added without being classified — or if no such module or exported name exists.

Parameters:

module (str)

Return type:

Literal[‘supported’, ‘internal’, ‘undecided’]

zarr_vectors.require_api(spec='', *, features=())[source]

Raise unless this build’s API surface satisfies spec.

Parameters:
  • spec (str) – Comma-separated >=/>/<=/</== clauses against __api_version__, e.g. ">=1.0". Empty checks only features.

  • features (object) – Feature names from FEATURES that must all be present. Prefer these to a version range: they say what the caller needs rather than when it happened to land.

Raises:

ImportError – If the requirement is not met. ImportError rather than a ZVError because the failure is “this build does not have what I import”, and that is what a caller’s dependency handling already catches.

Return type:

None

zarr_vectors.FEATURES = frozenset({'array-link-cells', 'array-manifests', 'chunk-sources', 'coarsen-strategy-options', 'commit-object-index', 'concurrency-contract', 'csr-fragments', 'decode-zstd', 'dense-manifests', 'device-decode', 'device-io', 'durable-deferred', 'durable-writes', 'fork-safe-pools', 'fragment-gather', 'manifest-block-dtype', 'manifest-blocks-64k', 'manifest-codec', 'manifests-csr-ascending', 'object-attribute-columns', 'object-count-unbounded', 'object-layer-shards', 'object-manifest-writer', 'presence-rebuild', 'query-cells', 'read-cells', 'read-cells-fragments', 'read-io-report', 'runtime-capabilities', 'selection-level-optional', 'shard-transaction', 'shard-transaction-io-threads', 'sharded-presence-guard', 'spec-without-presence', 'store-layout', 'supplied-presence', 'surfaces', 'transaction-prefetch', 'transaction-sweep', 'verified-presence', 'vertex-attributes-on-read'})

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

zarr_vectors.runtime_capabilities(*, probe_device=False)[source]

What this installation of zarr-vectors can do.

Every value is a bool, True only when usable in this process; the keys are listed in docs/how_to/gpu.md. The device keys (device_arrays, device_decode, gpu_encode) need the GPU extension to import and, with probe_device=True, a visible CUDA device; gpu_codecs and gpu_io also need nvCOMP and kvikio. gds is only probed with probe_device=True (it opens the cuFile driver). Probing initialises CUDA, so a process that will fork should probe in its children.

Returns:

A new dict each call; the key set only grows between releases.

Parameters:

probe_device (bool)

Return type:

dict[str, bool]