Skip to main content

simplezarr

A simple, elegant, and fast Zarr implementation

Intro

Zarr 3 is a great file format for large datasets. It's nice and elegant. The simplezarr lib is what happens when one implemented this spec as directly as possible in Python.

Details

Parallelism and async are achieved using a thread-pool and concurrent.futures.Future objects. You can use it with async frameworks (like asyncio), but none of it is forced. You can use it synchronously and still benefit from parallelism. Calls that return a Future have a _soon suffix. Calls that are blocking have a _now suffix.

The core is simple, easy to follow, and gives predictable performance. Extra functionality is provided as functions and classes that are provided in simplezarr.utils. This keeps the lib light, and easy to adopt in a wide variety of use cases.

The Zarr 3.1 spec is fully implemented, except for sharding. The core has 100% test coverage.

Also supports reading and writing multiscale OME-Zarr pyramids - and it's fast!

Installation

pip install simplezarr

Quick example

Write a Zarr file to an in-memory store:

>>> import simplezarr

>>> store = simplezarr.MemoryStore()

>>> simplezarr.ZarrGroup.create(store, "")

>>> arr = simplezarr.ZarrArray.create(store, "array1", (1000, 1000), "uint16", chunk_shape=(64, 64))

>>> arr[...].set_now(42)

Reading:

>>> group = simplezarr.open_zarr(store)

>>> group
<ZarrGroup '' with 1 children at 0x10910a5d0>
    <ZarrArray 'array1' 1000x1000 uint16 at 0x10910a490>

>>> arr = group["array1"]

>>> a = arr[:100, :100].get_now()  # blocking, but reads chunks in parallel

>>> a
array([[42, 42, 42, ..., 42, 42, 42],
       [42, 42, 42, ..., 42, 42, 42],
       [42, 42, 42, ..., 42, 42, 42],
       ...,
       [42, 42, 42, ..., 42, 42, 42],
       [42, 42, 42, ..., 42, 42, 42],
       [42, 42, 42, ..., 42, 42, 42]], shape=(100, 100), dtype=uint16)

Parallel/lazy reads:

>>> f1 = array[:200, :200].get_soon()

>>> f2 = array[-200:, -200:].get_soon()

>>> a1, a2 = [f1.result(), f2.result()]

Developers

  • Clone the repo.
  • Install rendercanvas and developer deps using pip install -e .[dev].
  • Use ruff format to apply autoformatting.
  • Use ruff check to check for linting errors.
  • Use pytest tests to run the tests. Or pytest tests --cov=simplezarr --cov-report=html to get coverage reporting.

License

This code is distributed under the MIT license.

Metadata

Release files for simplezarr 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplezarr 1.2.1
File Size Uploaded Provenance Actions
simplezarr-1.2.1.tar.gz 42.7 kB With provenance Details for simplezarr-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simplezarr 1.2.1
File Interpreter ABI Platform Actions
simplezarr-1.2.1-py3-none-any.whl Python 3 none any Details for simplezarr-1.2.1-py3-none-any.whl

Total release size: 89.7 kB

Release files / simplezarr-1.2.1.tar.gz

Download URL simplezarr-1.2.1.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2212e963e721a6f9a58d428bcf2e72bfbdc0820dd785d89a0f1820f42ba8faa5
BLAKE2b-256 checksum
How to use checksums
fc751e565cff4cfa7742d16ecac54cec68a1fdb0687f244ae343ee6b602b68ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / simplezarr-1.2.1-py3-none-any.whl

Download URL simplezarr-1.2.1-py3-none-any.whl
Size 47.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb2db676197cbb693175325bcada7182b17ca20d12fc8ff68bf08c9a0d313927
BLAKE2b-256 checksum
How to use checksums
054397c0a62e3f2caae6cca69b996402c3c6e8f8f059268d0f290c305b9700eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for simplezarr 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simplezarr-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page