Skip to main content

simplezarr

A simple, elegant, and efficient 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.

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.1.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.1.0
File Size Uploaded
simplezarr-1.1.0.tar.gz 34.4 kB Details

Built distribution (wheel)

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

Total release size: 72.1 kB

Release files / simplezarr-1.1.0.tar.gz

Download URL simplezarr-1.1.0.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
55869b3d09cbf5ffd127ec00124aa707da30e558960904cb0eb2f7719931b843
BLAKE2b-256 checksum
How to use checksums
f788b1bfcafbd344d3e29a95d824223d9e2dd85889cda8cb5960c981092ddc8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

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

Download URL simplezarr-1.1.0-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
392750350996e20bba960cbceeb84941ee50e763bfced01cdd34f1af4b6836d5
BLAKE2b-256 checksum
How to use checksums
6a2831a3185837d51d9a9eb3466302bcad31f514cc25f61cf9f05b7034c1ad01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.0.1

2 release files

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