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.0

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.0
File Size Uploaded Provenance Actions
simplezarr-1.2.0.tar.gz 42.4 kB With provenance Details for simplezarr-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 89.2 kB

Release files / simplezarr-1.2.0.tar.gz

Download URL simplezarr-1.2.0.tar.gz
Size 42.4 kB
Tags Source
SHA-256 checksum
How to use checksums
350af1c43ad2588153139946b800b88bf8c68dcbb970f463f9a7e13f41e320e5
BLAKE2b-256 checksum
How to use checksums
74d747b9e57539cd74c4d86a88203d65ad3657c4d5c87a0793b7ba769c9f35b1
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 23, 2026.

Transparency log

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

Download URL simplezarr-1.2.0-py3-none-any.whl
Size 46.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c758d4eee9c27cba54bda043341ff1876f2ae25f15018ca3d334fd89d0d86bb
BLAKE2b-256 checksum
How to use checksums
6b58ae29e91e871af66f5809ff0a91e64f89e527730f7b5c9802a6925f5e4a1e
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 23, 2026.

Transparency log

Security for simplezarr 1.2.0

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.0.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 23, 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