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

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

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.1.0.tar.gz (910.2 kB view details)

Uploaded Source

Built Distributions

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

rustwx-0.1.0-cp313-cp313-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.13Windows x86-64

rustwx-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

rustwx-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rustwx-0.1.0-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

rustwx-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

rustwx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rustwx-0.1.0-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

rustwx-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

rustwx-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rustwx-0.1.0-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

rustwx-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

rustwx-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for rustwx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e5c05bc89a6657dce5653f756f743237d2e7ad2a4034d6b99bbf9be0f0990bf8
MD5 da54ee75ed5f373a938ba5cc4f26a24b
BLAKE2b-256 51ab640697570114ef4038c66cabdd6bb306a559176d8fadf249f44a8770a3d0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rustwx-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0c8efb46ec786e7c94b452bf898b2960663b6b46be697e1822d8c5accf915de3
MD5 8229890bd65b9e8b35de1808d04ccc25
BLAKE2b-256 54f480803164c1c6f013e1ec92f5a8f6a4e7c81422cfda0485885ece205240c6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2f758495e4e48b06c3f1688435bd4355880ca5864909025542b6705b4244e609
MD5 6aa9ce218de744b034e04c8d4cb06a00
BLAKE2b-256 017de8782e33701aa6f4e9f2d2842dd6a9f5027d9c2ff473640b81b1db2cab6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70c56a4162d0c23dd4612ea6ee6dca09483022eee592269fac81ddf314456606
MD5 991b40d8a83ae9a21013ee384cbf5dec
BLAKE2b-256 9e5deb9d1ddd7f71aaec319ed289a5999970df5ac98c33638cc1667b602dbec7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rustwx-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 51eaadca3a4e042c676b14cfe07d7851c65f894aa9f452a72c8c2293960592a7
MD5 66666be6b53a421b7737e4340f036818
BLAKE2b-256 8348d4b9e13c928a7534d4cd073819bbbee5a6b414be5a39306a7eff1b948038

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e0284d32f2a4f185d9c3dd14fd8f6ff7652e3876804835d76b065838df060d82
MD5 842e84fbf9c8b60a63899938e0afb0ba
BLAKE2b-256 04d2f9965a8294ea3fa5a68d74d3a2d234b9765e81eb5ca1f14a1874e1683fb5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d4780dd3fc86fc2e142e104948fe52247ae98262f4a914bae59930722ddb8efc
MD5 0223f0d3253a7c48a7ff11368469ec4a
BLAKE2b-256 1e988ee0cdb624c3f37dbf6e2f3dbe825230eb4706c5d3392dd5f6a04082ac66

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rustwx-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d57e7dd0313bd98fbf05a96ed4705e8d95659d92c5ce63967093118a45a20cb8
MD5 1c0c1e0f7888b5e218a2b64f3e660a40
BLAKE2b-256 70ce2448f97d6a81bd6f15d99b59a7f59eef652f933d79870b148918a74818f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2cebfb68be8369e4e77d91bcfe56b529b1c17917303466193d7c9008d7fb6446
MD5 c56e8f768e4059170cce51a23bc6d96f
BLAKE2b-256 06b236f2b84d03cdcb74240012c51a5445a0e49e07bbf159a6116b219e0784d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 33aa0820f406aad0a047c3b849866c85a9d9d04689d7429219e6bfdbb06f1f76
MD5 c70b2083f591a096e2e635010b2b36a0
BLAKE2b-256 63d82079595079bfac8a40cf4d07c7536146e0bd00957f04f44c3c1505bfb999

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rustwx-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.3 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.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cb855bdb4c814de41c59a40155c34ca164298558b934301bcf8cdaa54c6897e9
MD5 6b6fe679e25a48dd0878cb92cb80ed7d
BLAKE2b-256 192e73ea4b84891c12387c099255bcea49b81a16eb55c83a459720c75e931dd0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5b196abdebbdd60fcbcb63f950b620ca9027341c1c9ceddf24b71d0d5ece6859
MD5 3fde30eb906fdf8d7aaead49f44e1c87
BLAKE2b-256 39c6ba1cbdcb6c5c916e8bb8829325e1ffbdc9318052b048dbbd0dd107925392

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rustwx-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b23813b0fc984a97710ba31e1406f46896b6305197f782515f6506b40cf3b4e6
MD5 7a8af6292f974282860671985992c4d0
BLAKE2b-256 b60a0cccc5bfacd8236efed543a26ae54bf5e90158d9da840d77c06473c0cc7e

See more details on using hashes here.

Provenance

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