Skip to main content

rustwx Python bindings

rustwx is the optional Python binding package for the Rust-first rustwx weather workspace.

Design goal

Keep Python convenient, keep the hot path in Rust, and expose generic render/model metadata surfaces that are usable outside WRF-specific callers.

What is implemented

With the python feature enabled, the module exposes:

  • agent-facing discovery and map rendering via agent_capabilities_json, list_domains_json, render_maps_json, render_glm_lightning_json, and sample_point_timeseries_json
  • model listing and source/model helpers
  • projected-grid rendering via render_projected_map and render_projected_map_json
  • compatibility aliases render_wrf_map and render_wrf_map_json
  • standalone projected projection metadata via describe_projected_projection
  • standalone projected grid/layout metadata via describe_projected_geometry
  • standalone projected CONUS basemap overlay extraction via build_projected_basemap_overlays
  • future-facing cross-section request validation/normalization via normalize_cross_section_request
  • native sounding-column rendering via render_sounding_column and render_sounding_column_json

The wheel also installs a stable rustwx console command for agent and MCP adapters, plus a standalone local web UI command:

rustwx capabilities
rustwx list-domains --kind country --limit 5
rustwx prepare-data --date 20260424 --model hrrr --forecast-hours 0-2 --products 2m_temperature_10m_winds,2m_dewpoint_10m_winds
rustwx render-maps --date 20260424 --model hrrr --domain california --product 2m_temperature_10m_winds --out-dir out
rustwx render-lightning --domain california --data-dir C:\Users\drew\lightning-test\data\glm --out-dir out
rustwx sample-point-timeseries --date 20260427 --cycle 0 --lat 40.802 --lon -124.164 --forecast-hour-end 6
rustwx-studio

rustwx-studio runs a no-AI browser UI directly from the rustwx wheel. The first surface includes every model/product advertised by agent_capabilities_json, GOES satellite rendering through render_goes_satellite_json, click-to-sounding, pressure VolumeStore cross-sections, WxStore export/import/plotting, point time-series sampling through sample_point_timeseries_json, and NEXRAD rendering when the optional radar_export binary is available on PATH or via --bin-dir. Studio launches generation through a local background job queue, so larger domain/product batches can be monitored from the browser while outputs stream into the configured artifact directory. The Prepare Data action and prepare_model_data_json API warm the shared GRIB cache for selected products, forecast hours, model runs, and sources before plotting, so subsequent map renders reuse cached subsets. The same workflow is available from the console as rustwx prepare-data. Interactive soundings and cross sections use a pressure VolumeStore when the optional store builder/renderers are available: the first request warms the model/domain/hour cache, and subsequent clicks render from the store rather than re-decoding pressure GRIBs.

render-maps accepts mixed product slugs and routes them to the appropriate direct, light derived, heavy ECAPE-derived, or HRRR windowed product path. Heavy ECAPE slugs such as sbecape, mlecape, muecape, ECAPE/CAPE ratios, NCAPE, ECIN, and ECAPE EHI/SCP/STP use the canonical derived_batch ECAPE path; they do not require callers to discover or run separate binaries.

When cache_dir / --cache-dir is omitted, the agent API uses a shared rustwx_outputs/cache fetch/decode cache, or RUSTWX_CACHE_DIR when that environment variable is set. The cache is intentionally independent of out_dir and map bounds, so city or bbox sweeps can reuse the same upstream GRIB fetches while writing PNGs into different output folders.

MCP servers should call these stable Python/CLI entry points instead of invoking internal proof binaries.

render_glm_lightning_json / rustwx render-lightning reads GOES GLM OR_GLM-L2-LCFA_*.nc files, renders native Rust projected flash maps, and writes a JSON flash artifact with lat/lon, time, energy, and area fields for agent consumption.

sample_point_timeseries_json samples native model fields at a lat/lon over a forecast-hour range for meteograms and point-and-click agent tools. The default variable set is HRRR-meteogram ready: 2 m T/Td/Tw/RH, 10 m wind/gust, hourly and accumulated QPF, low/mid/high clouds, MSLP, VPD, HDW, and the fire-weather composite. It uses rustwx's GRIB/idx fetch path and shared cache rather than cfgrib/xarray.

Every new projected helper has both a Python-object entry point and a _json variant:

  • Python-object entry points accept either a JSON string or a JSON-serializable Python dict
  • _json entry points keep returning pretty JSON strings for low-friction interop

Projected map API

The projected map surface is generic and public-facing. The caller supplies:

  • lat, lon, field as numpy.ndarray 2-D arrays
  • a render spec with product metadata, color scale, layout, and projection metadata
  • optional contour, overlay, and wind layers

render_projected_map(...) writes the PNG and returns a Python dict with:

  • typed projection, extents, layout, and layers sections
  • legacy pixel_bounds, data_extent, valid_data_extent, and projection_info keys for compatibility

Minimal example

import rustwx

print(rustwx.list_models_json())

Point time-series example

import json
import rustwx

report = rustwx.sample_point_timeseries_json(json.dumps({
    "model": "hrrr",
    "date_yyyymmdd": "20260427",
    "cycle_utc": 0,
    "source": "nomads",
    "lat": 40.802,
    "lon": -124.164,
    "forecast_hour_start": 0,
    "forecast_hour_end": 6,
    "variables": ["temperature_2m_c", "relative_humidity_2m_pct", "wind_speed_10m_ms", "hdw"],
}))
print(report)

Projected render example

import rustwx

spec = {
    "output_path": "example.png",
    "product_key": "Example",
    "field_units": "dBZ",
    "scale": {
        "kind": "palette",
        "palette": "reflectivity",
        "levels": [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70],
        "extend": "Both",
    },
    "projection": {
        "map_proj": 1,
        "truelat1": 30.0,
        "truelat2": 60.0,
        "stand_lon": -97.0,
        "cen_lat": 38.0,
        "cen_lon": -97.0,
    },
    "width": 1100,
    "height": 850,
    "basemap_style": "none",
}

metadata = rustwx.render_projected_map(spec, lat, lon, field)
print(metadata["projection"]["kind"])
print(metadata["pixel_bounds"])

Geometry and overlay metadata example

surface = {
    "projection": spec["projection"],
    "width": 1100,
    "height": 850,
    "visual_mode": "filled_meteorology",
    "basemap_style": "filled",
}

geometry = rustwx.describe_projected_geometry(
    surface,
    lat,
    lon,
    include_projected_domain=False,
)
overlays = rustwx.build_projected_basemap_overlays(
    surface,
    lat,
    lon,
    include_geometry=False,
)

print(geometry["extents"]["padded"])
print(overlays["counts"])

Cross-section request normalization example

normalize_cross_section_request(...) does not render a cross-section yet. It validates and fills defaults for a future shared cross-section API surface.

xsect = rustwx.normalize_cross_section_request(
    {
        "path": {
            "start": {"lat": 39.74, "lon": -104.99, "label": "Denver"},
            "end": {"lat": 41.88, "lon": -87.63, "label": "Chicago"},
        },
        "field": {"product_key": "temperature", "field_units": "degC"},
    }
)

print(xsect["path_metrics"])
print(xsect["request"]["axis"])

Current limits

  • projected rendering still expects caller-owned arrays
  • cross-section support is validation/normalization only in this crate
  • render_maps_json covers model fetch/download/render orchestration for direct, derived, heavy ECAPE-derived, and HRRR windowed map products
  • sample_point_timeseries_json is a point data primitive; consumer-specific meteogram styling stays outside the Python wheel
  • sounding rendering expects a caller-supplied validated column; model fetch and lat/lon extraction live in the Rust CLI for now

Release files for rustwx 0.5.11

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

Source distribution (sdist)

Source distribution for rustwx 0.5.11
File Size Uploaded
rustwx-0.5.11.tar.gz 2.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for rustwx 0.5.11
File
rustwx-0.5.11-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
rustwx-0.5.11-cp313-cp313-manylinux_2_39_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.39+ x86-64 Details
rustwx-0.5.11-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
rustwx-0.5.11-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
rustwx-0.5.11-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details
rustwx-0.5.11-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
rustwx-0.5.11-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
rustwx-0.5.11-cp311-cp311-manylinux_2_39_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.39+ x86-64 Details
rustwx-0.5.11-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
rustwx-0.5.11-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
rustwx-0.5.11-cp310-cp310-manylinux_2_39_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.39+ x86-64 Details
rustwx-0.5.11-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 83.8 MB

Release files / rustwx-0.5.11.tar.gz

Download URL rustwx-0.5.11.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
6e6f9d556c103fb0f607c2e4a6d25dfa9bd8b8130e3c756c38d09fa9a4827a55
BLAKE2b-256 checksum
How to use checksums
ec7c8ae8ba60bf6e03ad05952411a1df3053d4d2207c4c2ce4e9798f7ca6569e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp313-cp313-win_amd64.whl

Download URL rustwx-0.5.11-cp313-cp313-win_amd64.whl
Size 6.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b67fd1a79de52d469b18165727f452bc018cad28c70c3a820a4e37fc2c383f41
BLAKE2b-256 checksum
How to use checksums
ca9064afbb88dc55882f096272124a7c1c37613b056ba7a0df0e75e5a82679ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp313-cp313-manylinux_2_39_x86_64.whl

Download URL rustwx-0.5.11-cp313-cp313-manylinux_2_39_x86_64.whl
Size 7.0 MB
Tags CPython 3.13 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
e3cd319100036de0dd7444d258a39cea2967432f25bf8f65ca81f229bef1eb5c
BLAKE2b-256 checksum
How to use checksums
b96f62c167e3838157cbb4d1e8c0da1c7ef4391c1a8643bb51e0ad3e0436a8f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp313-cp313-macosx_11_0_arm64.whl

Download URL rustwx-0.5.11-cp313-cp313-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5b07db21a77847212caff4de48a30cc0e4d826b87452e4a68f803964cf314c00
BLAKE2b-256 checksum
How to use checksums
c8c85ee0e743f00494b3c40dfd435e2b607bebb40f569ee1167d1161d4f99dd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp312-cp312-win_amd64.whl

Download URL rustwx-0.5.11-cp312-cp312-win_amd64.whl
Size 6.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4688f82683af459dacac6ec1fbb9d5dc760b25145cb20c8bfc9c74060053823f
BLAKE2b-256 checksum
How to use checksums
2d07d54e65d8d230f4b3fbe05a53fb709069abb2cff0cd508550d608c359604f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL rustwx-0.5.11-cp312-cp312-manylinux_2_39_x86_64.whl
Size 7.0 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
a2afe214d8e9160fe9d4ea3eefea7c3bb3409789ecf400c89ec683bb6a465f55
BLAKE2b-256 checksum
How to use checksums
59f05f879aa6fffe231de827315a4c1343a771879a484f1d858d819ca3d79d4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp312-cp312-macosx_11_0_arm64.whl

Download URL rustwx-0.5.11-cp312-cp312-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4e4430984db1da1c41f6e634beddf1c576ab788ead70ab5baeae8f2010668f50
BLAKE2b-256 checksum
How to use checksums
0a33462a14814af4b9ed1908b19b8792b0f4131ad51ae807e51b9f6889bc5d14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp311-cp311-win_amd64.whl

Download URL rustwx-0.5.11-cp311-cp311-win_amd64.whl
Size 6.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e359f0f801c91e860577946671a353e52c18e4ecb428bc314a64a98096cc21d9
BLAKE2b-256 checksum
How to use checksums
94ae7605dca96541389b27944f022e207046ed317e2f54427eccec3ce51a158e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp311-cp311-manylinux_2_39_x86_64.whl

Download URL rustwx-0.5.11-cp311-cp311-manylinux_2_39_x86_64.whl
Size 7.0 MB
Tags CPython 3.11 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
f55ef50429460743731a032730c5961c0e302bf7a6b000b8bc9d5f8f638e4fa4
BLAKE2b-256 checksum
How to use checksums
8fdbf23ff2bffa34bc701a17ef4c05be5008ffcfadd49c1ec8960d01990cb645
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp311-cp311-macosx_11_0_arm64.whl

Download URL rustwx-0.5.11-cp311-cp311-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c8952020eb7a524aa2d0657562aa34cb255ec52b32138ca6467df3f0fcdb21f5
BLAKE2b-256 checksum
How to use checksums
98c7ba413e49725f9b12ad02e5888b21321f683704f0bda8e5d4b59cb9a9a776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp310-cp310-win_amd64.whl

Download URL rustwx-0.5.11-cp310-cp310-win_amd64.whl
Size 6.9 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
afb606ac2c5b906880987433db719104e32921e62ed456fec2eb841d740b9bf3
BLAKE2b-256 checksum
How to use checksums
40333b0b9e5aaa1f824e8ea5165dec9b4c32ed827db24578cba021a0ec7c9ace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp310-cp310-manylinux_2_39_x86_64.whl

Download URL rustwx-0.5.11-cp310-cp310-manylinux_2_39_x86_64.whl
Size 7.0 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
9b205186dcd8b210f222b0a0887695927eb3fdb4c55a167f143784169164f22b
BLAKE2b-256 checksum
How to use checksums
85ac04aba7fd39e78185fac9b0f00c909aea746443dc5352d551dd3c1797beb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release files / rustwx-0.5.11-cp310-cp310-macosx_11_0_arm64.whl

Download URL rustwx-0.5.11-cp310-cp310-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4e3a0b73311c3ed2b6311ab503b635fa35e18a2bbbb620317da03be07523fbf9
BLAKE2b-256 checksum
How to use checksums
e4adad3e4f705cd208e7c537382c00683129149c29e207baf61360f8f018f395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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

Transparency log

Release history Release notifications | RSS feed

This release

0.5.11 This release

13 release files

0.5.9

13 release files

0.5.8

13 release files

0.4.6

13 release files

0.4.5

13 release files

0.4.4

13 release files

0.4.3

13 release files

0.4.2

13 release files

0.4.0

13 release files

0.3.0

13 release files

0.2.0

13 release files

0.1.0

13 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