Skip to main content

xuepy

Xue (雪) weather bundles for Python: the decoder, and an experimental native encoder — the Xue Rust crate through PyO3.

A .xue file packs one variable of a global forecast run as quantized single-byte planes with temporal residual prediction and per-plane Zstandard, so a browser can animate a 240-hour run frame by frame. docs/format.md in the repository is the normative specification.

Installing

pip install xuepy

Linux wheels are manylinux_2_39 (Ubuntu 24.04+, Debian 13+) and macOS is arm64 only. There is no sdist: building from source needs GDAL, libclang and cmake, and an unsupported platform is better served by a clear "no matching distribution" than by a confusing build failure.

Decoding

Bundle is the same reader the browser runs through wasm, so a bundle that decodes here decodes there. A plane comes back as the uint8 NumPy array of quantized codes the shader would have uploaded to an R8 texture; the metadata's quantization block turns it back into physical values.

import xue

bundle = xue.Bundle.open("tmp2m.xue")
plane = bundle.decode(variable_id=1, frame_offset=24)   # uint8, width * height

codebook = bundle.metadata["variables"][0]["quantization"]
celsius = codebook["offset"] + plane * codebook["scale"]

bundle.frame_offsets, bundle.unit_seconds and bundle.metadata describe the time axis and the grid. Reconstruction is checked against the CRC-32 the encoder wrote, so a corrupt file raises rather than returning wrong numbers.

Encoding

Experimental, and held to the Python reference pipeline by byte-for-byte identical output on every source it supports — GFS, ECMWF, GFS surface flux, and the CMA radar mosaic.

report = xue.convert_bin(["data/raw/gfs.2026082006"], "out/", model="gfs")

The stages are also exposed on their own — quantize, encode_residual, decimate, encode_poster — taking and returning NumPy arrays.

What is in the wheel

Its own minimal GDAL: the GRIB and netCDF drivers and nothing else, with GDAL's and PROJ's data directories beside it, because the GRIB driver cannot read a band without them. Seven shared libraries rather than the 227 a distribution GDAL pulls in, all permissively licensed, with their notices in xue/licenses/. Nothing needs to be installed alongside it and no environment variable needs setting.

See docs/encoder.md for how it is built and what it is measured against.

Metadata

Release files for xuepy 0.5.0

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

Built distributions (wheels)

Table of built distributions (wheels) for xuepy 0.5.0
File Interpreter ABI Platform
xuepy-0.5.0-cp311-abi3-manylinux_2_39_x86_64.whl CPython 3.11 abi3 Linux glibc 2.39+ x86-64 Details
xuepy-0.5.0-cp311-abi3-manylinux_2_39_aarch64.whl CPython 3.11 abi3 Linux glibc 2.39+ ARM64 Details
xuepy-0.5.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 46.1 MB

Release files / xuepy-0.5.0-cp311-abi3-manylinux_2_39_x86_64.whl

Download URL xuepy-0.5.0-cp311-abi3-manylinux_2_39_x86_64.whl
Size 17.3 MB
Tags CPython 3.11 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
361cbcfd3df85aecbb72c90918dd530ce0f29a3eeae10115c965fa76e35a1f7d
BLAKE2b-256 checksum
How to use checksums
b5c421f86c1249ee767a0a620f5a21ed3579b281f8b14ff5604096d6d267379a
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 Sep 10, 2026.

Transparency log

Release files / xuepy-0.5.0-cp311-abi3-manylinux_2_39_aarch64.whl

Download URL xuepy-0.5.0-cp311-abi3-manylinux_2_39_aarch64.whl
Size 16.2 MB
Tags CPython 3.11 Linux glibc 2.39+ ARM64 abi3
SHA-256 checksum
How to use checksums
82e18d677d66d6765747fa08256c5230d2f7437281bdb9850ad538839b6992b9
BLAKE2b-256 checksum
How to use checksums
3ef70d45603eba81c3a470ccd2d1a7aa4877609d37d15f33a4ce0890ecbbde04
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 Sep 10, 2026.

Transparency log

Release files / xuepy-0.5.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL xuepy-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Size 12.6 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4e3d9a8257ab4f9e8e055c0b32b1f6b3d2f95ecc29e3d39ec7de600ab382047f
BLAKE2b-256 checksum
How to use checksums
647cfae8371eb5955f0394b546712362a8d54b65e6bdf468d2af5487a7b5e6ba
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 Sep 10, 2026.

Transparency log
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