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:

  • 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

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.2.0.tar.gz (1.1 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.2.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

rustwx-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

rustwx-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rustwx-0.2.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

rustwx-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

rustwx-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rustwx-0.2.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

rustwx-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

rustwx-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rustwx-0.2.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

rustwx-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

rustwx-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for rustwx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f1402aee2946468fab111280b250a811f9e300f96e43cf4376ba67c4e4186598
MD5 f57fd92b1327efbf492be39a04da307b
BLAKE2b-256 68adaaab217e01f5a9be5de5810364a72ebe54390a9614b2737470dd8c084db3

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.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.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 80c031f39a88743e3e066540a2e554e98e57b228c3ad900eddedc807d5f9312c
MD5 bdaabc72950cdf01b353858f0a467ded
BLAKE2b-256 34c2bef7c1fd9203172279ff06771a85f4ca182ed2e171622385d80fb289071a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6b86415f1c52ec406e38c2c9006639e0be90e6be568af2c3995e36d03badaa44
MD5 c6f6b656b2b2cdb084b484a65ff68a0b
BLAKE2b-256 9c73558cdbbee36c37b9afd558e7e11fb1bb7c8fd5866c240bd05291d08bc53e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.0-cp313-cp313-manylinux_2_34_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.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 41d53dd352479291e0c791862bd4ee382597f4131d3860b5786b4851aff7d8b2
MD5 5d3139a2ccdce9e3d3dda20a9fbf7867
BLAKE2b-256 cffc87651f626148de3c1b7817e1b752dffe4cf7f71eaa702e180f301bc22f0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.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.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 601548d7e0ab661fb7901be3b77242f494dac36a5bb44c79fbde6e1c7bec8f3b
MD5 8a76a828834f5b4f86eee22b77cd1fd7
BLAKE2b-256 ad9b2f2f92c56045ea8daa7d3ba5359f4d660a6295af8cf8ceb43017d64639b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 005f1a78581fa4374b6e009aa54cb710373ef5463370b9109dc3cec40f0356b4
MD5 dc497fb896253730a9670fd58b0d8bd3
BLAKE2b-256 92280631b949c6ab4bff04ab55245a375cb5e17407e452f5b1e306a5a1c021c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.0-cp312-cp312-manylinux_2_34_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.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ae1c2f80dae3f6ba01525a065b32e60ff9cc2afe8afdd4b9e8d252540db6fdd
MD5 56a1ed035ed300e42c87a87d23c6ddd6
BLAKE2b-256 99153244007ff5c79cdc855ef2e108e41611a060c24e34152e8dbd3b60e05d26

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.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.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c7128d114b00f3a68f28a0afb143f0e8a12c01408f0030f63dea9181b3f07db5
MD5 21ba1b180a7379c5c0c9c18b401676bc
BLAKE2b-256 064b5b0464513aba9898875ff0ffd4d5c950bc3e5c1ad447a79147d6da70a8e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c13114b836a37d44f4d2a0aabebc1913b3d6f6aefdf2763f3bb4fe3e6fce2714
MD5 344aaaf04757e278e068ff4c325ccdfe
BLAKE2b-256 c23e5b01319db0f512f3dd1a77e9464cb240fc4d9e52c941e885ce692f152b41

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.0-cp311-cp311-manylinux_2_34_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.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9226a8010f8645f95632eb40af388e8e28d38c96fa65e2be6cc2192678a4bc65
MD5 88dd01f229d26f88561775db4984064f
BLAKE2b-256 7a1a1535e7d3437c8910d3d2a5998713b4998538078bac51607dcf54670adb45

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rustwx-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.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.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 024faa6d63576ef534f365400d2baeca5e6da9cbfdaf4fc255ff342050b0dbdf
MD5 dd9a50b00316f0d92e679ed7f52c5b18
BLAKE2b-256 46bc80ae6eec1390640d8321b36f18231166f78d916eb18dc2f82c541be769ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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.2.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9ab49ad9e617ef4e9e298e80275f5b8fbb6778122d951be0a8d095b4bca13a34
MD5 5ca529c5da8e17c10c34ed76b0ee29d6
BLAKE2b-256 3c38885b5c7b69b5f1bff037b20781be2272b588b9e54d8063d093ae28cf2ab1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.0-cp310-cp310-manylinux_2_34_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.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rustwx-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3cf14ed72daceb88fe0d66d84776599381b5c6573a63458d390b9b3838642670
MD5 2d454593cee9e3dd28a531d267238182
BLAKE2b-256 d6bc559ed8b0f8a140102eb34c39c03ac7a0938494f20dde8219a4eb41865f57

See more details on using hashes here.

Provenance

The following attestation bundles were made for rustwx-0.2.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