zarr-beluga
Beluga is a fast reader for one access pattern: random reads over time, dense over space and variables, of gridded weather and climate data from blob storage into GPU training loops.
It reads zarr v2 groups in the WeatherBench2 layout (one array per variable), single-array zarr v3 stores (sharded or not) and Beluga's own format, from local disk, Azure Blob, S3 or GCS. The reader is written in Rust: it keeps many range requests in flight across sample boundaries, decodes in parallel straight into the output buffer, and hands each sample to Python without a copy (DLPack).
Install
pip install zarr-beluga # the import name is `beluga`
pip install "zarr-beluga[torch]" # with the PyTorch dataset
Wheels are built for Linux x86_64 and macOS arm64, Python 3.10 and later.
Use
import beluga
import torch
reader = beluga.Reader(
"az://my-container",
root="era5.zarr",
store="objstore",
store_options={
"azure_storage_account_name": "myaccount",
"azure_storage_sas_key_file": "/path/to/era5.sas",
},
source="zarr-group",
scheduler="zarrs-group",
)
print(reader.meta["channels"], reader.meta["n_time"])
# Windows of 4 consecutive timesteps starting at these time indices.
for sample in reader.stream([10, 3, 7], frames=4):
x = torch.from_dlpack(sample) # (4, channels, height, width) float32
A local directory works the same way (beluga.Reader("/data", root="era5.zarr", ...)).
Credentials can also come from the usual AZURE_*, AWS_* and GOOGLE_*
environment variables.
beluga.torchhasBelugaDataset, anIterableDatasetthat streams a shuffled epoch from one reader, andDeviceLoader, which moves samples to the GPU one step ahead.beluga.otter.make_dataloaderis a drop-in for the data loaders of otter's training configs.
Metadata
Release files for zarr-beluga 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zarr_beluga-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| zarr_beluga-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 41.8 MB
Release files / zarr_beluga-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | zarr_beluga-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 34.2 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
22499a6d3f253e01b221dc2fa20b8022c4cbd5529d96c4f051be559a86e7f06f
|
|
BLAKE2b-256 checksum How to use checksums |
e331c9720eccc75889bcefffe906bb31cc607b589e1931e435291563f69cd417
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 5, 2026.
Transparency logRelease files / zarr_beluga-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | zarr_beluga-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.6 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dbd383ec8161683584c568ba7d6fbcfed63f2153b3a8b67e035a2f58deb11458
|
|
BLAKE2b-256 checksum How to use checksums |
13cac7bf5f29058314418724988188c6b10987499b08a418298893d543973292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 5, 2026.
Transparency log