Rust-backed xarray DataTree backend for fast Zarr access from object storage
Project description
rustytree
Rust-backed xarray DataTree backend for fast Zarr (incl. icechunk) access from object storage.
rustytree registers as xr.open_datatree(engine="rustytree") and walks Zarr
v3 hierarchies — both icechunk-backed and vanilla — concurrently in async
across one FFI crossing. The goal is a drop-in faster replacement for
xr.open_datatree(engine="zarr"), especially on icechunk repos served from
object storage where xarray's current per-group sequential decoding is the
dominant cost.
Status
Alpha. xr.open_datatree(..., engine="rustytree") works end-to-end
against both icechunk repositories (pass session.store) and vanilla
Zarr v3 stores (path or s3:// URL). Lazy chunk reads via
RustyBackendArray, CF decoding (incl. metadata-only datetime dtype
inference), the recursive multi-node walk, glob group= filtering, and
non-recursive single-Dataset opens are all in. See
CHANGELOG.md for the per-PR breakdown.
Install from PyPI (the import name stays rustytree; the
distribution name on PyPI is rustytree-xarray because rustytree
collides with an unrelated dormant package):
pip install rustytree-xarray
Or install from source per Quick start below.
Example
Open the public anonymous NEXRAD KLOT icechunk repo on S3:
import icechunk
import xarray as xr
storage = icechunk.s3_storage(
bucket="nexrad-arco", prefix="KLOT",
region="us-east-1", anonymous=True,
)
session = icechunk.Repository.open(storage).readonly_session("main")
# Open the full DataTree (107 nodes — every VCP × sweep combination).
dt = xr.open_datatree(session.store, engine="rustytree")
# Or grab one specific sweep as a flat Dataset (skips walking siblings):
ds = xr.open_dataset(session.store, engine="rustytree",
group="/VCP-12/sweep_0")
# Or apply a glob pattern. "Give me sweep_0 from every VCP" is the
# canonical radar workflow — returns a tree filtered to those matches,
# with the VCP container groups auto-included as ancestors.
sweeps_0 = xr.open_datatree(session.store, engine="rustytree",
group="/*/sweep_0")
engine="rustytree" is a drop-in replacement for engine="zarr" —
same xr.open_datatree / xr.open_dataset entry points, same
storage_options / decode_* kwargs. The full demo (with side-by-side
timings against engine="zarr") is in
notebooks/klot_demo.ipynb.
Quick start
rustytree is a Rust extension built via maturin;
uv sync handles the venv, Python deps,
and the Rust build (via maturin's PEP 517 hook) in one command.
# Clone + enter the repo
git clone https://github.com/aladinor/rustytree.git
cd rustytree
# Install everything: venv, deps, and the compiled Rust extension.
uv sync --extra dev
# Confirm the install
.venv/bin/pytest tests/
# Launch Jupyter and open the demo notebook
.venv/bin/jupyter lab notebooks/klot_demo.ipynb
The notebooks and tests don't require AWS credentials — KLOT is read
anonymously via icechunk's anonymous S3 path. Network speed determines
cold-cache timings (expect ~1–3 s for engine="rustytree" on KLOT
from a home connection; ~50 s for engine="zarr" on the same).
Documentation
docs/architecture.md— what the project is and why the Rust backend wins.docs/usage.md— how to install, run the test suite, and the API surface (inputs,group=patterns, lazy reads, errors).docs/contributing.md— branching, commit conventions, validation gates, per-PR audit.docs/release-process.md— versioning, tag, CHANGELOG roll.
License
Apache License 2.0 (Apache-2.0).
Acknowledgements
Built on zarrs +
zarrs_icechunk +
icechunk.
Sibling project radish proved the
PyO3 + xarray-backend pattern. The bottlenecks this project sets out to
collapse are tracked in xarray PRs
#10742,
#11304, and
#11302.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rustytree_xarray-0.1.0.tar.gz.
File metadata
- Download URL: rustytree_xarray-0.1.0.tar.gz
- Upload date:
- Size: 137.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b5b44dc39d8131bc5fc9e4e0bec994224d5e39eb20d6c474e7bf174eb85a79e
|
|
| MD5 |
d28f50ae840faea2eb1d8c72fbe9e231
|
|
| BLAKE2b-256 |
c05b67eacc96aabd690f3727ee1df9104f303468defd10cfb8b66fa721d90493
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0.tar.gz:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0.tar.gz -
Subject digest:
6b5b44dc39d8131bc5fc9e4e0bec994224d5e39eb20d6c474e7bf174eb85a79e - Sigstore transparency entry: 1444671566
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.6 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a0e42c0e7da29f17173d088df2400ef6c9c253a2fa05e8b699a26d3c9407a14
|
|
| MD5 |
1977f902a26adba374c7e7013ff858d1
|
|
| BLAKE2b-256 |
fbd72f427da527f37e3d51ae8b2a1141f92844eed685c2d783d6355663deb3d6
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
9a0e42c0e7da29f17173d088df2400ef6c9c253a2fa05e8b699a26d3c9407a14 - Sigstore transparency entry: 1444672009
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 11.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2183882d0b58b2cc369ef0bdd248cc01708deaba81999042b38c11a3a770b09
|
|
| MD5 |
306f8c40cb4df1b3a7f1b75d8ae9ca4e
|
|
| BLAKE2b-256 |
04697d951b1b209f0745cdbacee9db027c686e6ab27cf57691fd337a9364776e
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
c2183882d0b58b2cc369ef0bdd248cc01708deaba81999042b38c11a3a770b09 - Sigstore transparency entry: 1444672271
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rustytree_xarray-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: rustytree_xarray-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.0 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b379b1e2f0e235fdeea657f1f963b1f3907abe15dec65cfdc9659ebeef5bf0bd
|
|
| MD5 |
ef27d99fce380a1e9de2bd3daa80f236
|
|
| BLAKE2b-256 |
6a0bc4b930064893bd000d04b8d4d357dab88f37295bdda6d76ff387c2f5c9de
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
b379b1e2f0e235fdeea657f1f963b1f3907abe15dec65cfdc9659ebeef5bf0bd - Sigstore transparency entry: 1444672403
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
690866eb4e090d8eb0eafdb944de483fb2509bd52be6968034ef180752502ccd
|
|
| MD5 |
6ffa3be5a778e7503b784ebd78f7cd96
|
|
| BLAKE2b-256 |
5313d0c5aadb7a81e1817abd8a837e73cdfad527bdfadfae925294ca04721759
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
690866eb4e090d8eb0eafdb944de483fb2509bd52be6968034ef180752502ccd - Sigstore transparency entry: 1444672159
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 11.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e9c9b81b8945ffaa024720927ec2f19d06363b16938e3cce1039bf1b40d4d4d
|
|
| MD5 |
a3fa8e5e6e4a705b87ad15582a79675a
|
|
| BLAKE2b-256 |
18fdc7f3f136c4d4eba405268075d334fe63be9a8ee36b1070fed94c7ea9d835
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
3e9c9b81b8945ffaa024720927ec2f19d06363b16938e3cce1039bf1b40d4d4d - Sigstore transparency entry: 1444671661
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rustytree_xarray-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rustytree_xarray-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.0 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08cd584ed0b99ea385de0dbe38ca4fda3d8551f18af224bf3568f3e4340b45f9
|
|
| MD5 |
40575d4de82976a2170eb33d9ee56181
|
|
| BLAKE2b-256 |
9d54d4b454eec5b1b8bcb2d6f875432772d2c2807548d3181286d0322160e12c
|
Provenance
The following attestation bundles were made for rustytree_xarray-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on aladinor/rustytree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rustytree_xarray-0.1.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
08cd584ed0b99ea385de0dbe38ca4fda3d8551f18af224bf3568f3e4340b45f9 - Sigstore transparency entry: 1444671847
- Sigstore integration time:
-
Permalink:
aladinor/rustytree@46451ec25a935da3b915cf9f3a800124f375ac82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aladinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46451ec25a935da3b915cf9f3a800124f375ac82 -
Trigger Event:
push
-
Statement type: