Skip to main content

Rust-first weather model metadata and projected map rendering bindings

Project description

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, and render_maps_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:

rustwx capabilities
rustwx list-domains --kind country --limit 5
rustwx render-maps --date 20260424 --model hrrr --domain california --product 2m_temperature_10m_winds --out-dir out

render-maps accepts mixed product slugs and routes them to the appropriate direct, derived, or HRRR windowed product path. MCP servers should call these stable Python/CLI entry points instead of invoking internal proof binaries.

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())

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
  • full fetch/download/render orchestration is still outside this binding layer
  • sounding rendering expects a caller-supplied validated column; model fetch and lat/lon extraction live in the Rust CLI for now

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rustwx-0.3.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rustwx-0.3.0-cp313-cp313-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.13Windows x86-64

rustwx-0.3.0-cp313-cp313-manylinux_2_39_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

rustwx-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rustwx-0.3.0-cp312-cp312-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.12Windows x86-64

rustwx-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

rustwx-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rustwx-0.3.0-cp311-cp311-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.11Windows x86-64

rustwx-0.3.0-cp311-cp311-manylinux_2_39_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

rustwx-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rustwx-0.3.0-cp310-cp310-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.10Windows x86-64

rustwx-0.3.0-cp310-cp310-manylinux_2_39_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

rustwx-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file rustwx-0.3.0.tar.gz.

File metadata

  • Download URL: rustwx-0.3.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustwx-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c660e88aaf6c5870313aebbe93ba9b707c77b78467a600727f78752414ec2a4d
MD5 0426d91e0a9ff5cbedc4f2f26efb3102
BLAKE2b-256 19de05b8536e8b204473a7ce0e7e28a5470e8549d1ad6d710632596194461eab

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0.tar.gz:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustwx-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5ab321f31d233ed5ab9807c28e809ebcfefbfbc4975b1022da343c557b6b74cf
MD5 1c9932664c10d0c2d3eda4df3df17dfc
BLAKE2b-256 8c0e2529a9ab5e3c3e4ade9bade95342324bd3668779ad88db5f6f44cbddbc11

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp313-cp313-win_amd64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b4d91acefb3e534e22fe9a490448a4a30ed17878966acace4d94680620a7bc12
MD5 6e2f3d15ce180d026119b248c4aedf41
BLAKE2b-256 5b9e4122ea94272d622f6345cfde69b961a08e347805ead1625d494cb343aabf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp313-cp313-manylinux_2_39_x86_64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de9042cfbf11f43aa373cfff6dc988cff75ed0ae382ab910666f21d3000d0ab8
MD5 97bf94073082e2f5e27392097aacbda7
BLAKE2b-256 5ad88a1703dfd022809e385b9965a20dfabfebc74d4be3db8d719f6921e65b2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustwx-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2adbf2b390f775ba95477f769d93b4fe4837a88b7489bef8a98cfc22aa320d0d
MD5 fbc7bd03f28da1eaebb731a30110023b
BLAKE2b-256 4727d0134deb319f592abe84249522afdacc66c13d9bcfb2b6e286492516243c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp312-cp312-win_amd64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a49507d8948b9a675b16bd2c2a315c0409bd119b0f2ca272e6c229aee0a4a3ef
MD5 8b634a1b592faf3155e0c5a5f4bef468
BLAKE2b-256 519044d6e91cedd0cef4c31436ff8b1348d7a797d3beef399a74d60b72d35416

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97d0304b09c99b5f2d75b83f4f9c8550f96b9087c963e3c9857eac992d58c439
MD5 18282384e1066e94d230f3004e3803bd
BLAKE2b-256 5c279b65aa4e3c7bba5e2daff313bab746f69dac8144735711c52800c133f091

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustwx-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 da32928c6884038f4071667a8ad325e8503855b3f24e38e74e18ccd1dad05c09
MD5 cd85bf4695b19dc3fe62173fa309b0af
BLAKE2b-256 95c5a83ceeb6d5894aaaadfbdc4df9d3051a9b016786a874bc800039ac84c277

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp311-cp311-win_amd64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 41a2156d090cb3c4847c1c32c3cf841d8259f56ce73546e34904a112e0675559
MD5 be5c3d8d6e952ba2387434fbe3e676b7
BLAKE2b-256 133ca894205ac682455db6531eacb3c018642f8ffbcf2ca1ba00640221b9a10b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp311-cp311-manylinux_2_39_x86_64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c5321b5b6f1d0fa2d7f5e5965303c98ac685c5a50ce8c85ee62df70e5a5d540
MD5 2b54198bc027a84848423668ccfc8488
BLAKE2b-256 7f5c9a3f09316fda63e5677a2b443c1a7b268c213820d34961555deeabfd974b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rustwx-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b5c7c15abddc0960d83fe9c96dce986979afafd3351824b42738409536fee093
MD5 6b19557e5b8f94f7c21b061bef489f3b
BLAKE2b-256 d5c386768d50bec157527e25fbe6e34a7d5b4aaf881b9391273c508ef3a693f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp310-cp310-win_amd64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 ef48e758e1420c20aa22521cb7565cd5b7b8aa2bf994404dff140fdd6e281397
MD5 e0e9d28fc9bb2d9847183f4208a7ddfc
BLAKE2b-256 6f9c1802da0d8a3a578f781b82abbd182a00fc3344367fa6ab4253d52a6e9c04

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp310-cp310-manylinux_2_39_x86_64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rustwx-0.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d7128d94ca9c8a2cc5ee52aefa2ac0b32a6d340f3803d00fbd9074e120cfc0f3
MD5 8fdd96a51a5dc48a1d48c730002a159a
BLAKE2b-256 83546a569d01b44a0b0966f11e64bef8c7d8a911367f41d329beb56bf02862f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.3.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: workflow.yml on FahrenheitResearch/rustwx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page