Skip to main content

Radiust

Radiust 项目标识

简体中文 · English

让普通人能够方便地获取、理解和使用公共气象雷达观测。

Public radar, directly to you.

Radiust 希望让用户通过自己设备上的开放工具连接雷达来源,优先采用官方来源,也支持可靠、可追溯的第三方产品。数据默认在本地获取、缓存和处理,核心观测功能无需 Radiust 账号或 Radiust 数据中转服务。

当前提供 CLI、Python SDK 和可复用的 Rust radiust-core;Python console command 和 SDK 共用 Rust Engine。面向普通公众的 Desktop 尚未实现,其查看、时间序列播放、多源默认选择、手动切换与故障回退属于后续路线。当前先做好观测,为未来预测模型保留数据接口;跨来源雷达拼图留待后续。

项目理念 · 发展路线
数据来源政策 · 品牌使用规则

当前源码版本为 0.1.8 alpha(待发布);下方 registry 安装示例仍使用已发布的 0.1.7。

Features · Install · Usage · 项目与许可 · Dev

Features

  • 多来源雷达获取:目录登记 25 个来源,可查询来源、产品、站点和最新时次;实际可用性及访问要求见来源清单。
  • 终端预览:查看来源原图、规则生成的灰度编码或已支持产品的 dBZ 数值。
  • 位置局部视图:以配置位置为中心投影到笛卡尔坐标,默认半径 50 km、间距 1 km;个人用途可由裸 cat 自动选择 RainViewer,终端报告显示来源署名与链接,网络仍需显式开启。
  • 按视图获取瓦片:RainViewer、Windy、BMKG 支持指定或自动选择 zoom,只下载视图所需瓦片;RainViewer 解码坐标匹配实际瓦片范围。新增级别已做离线验证,在线范围尚未逐级验收。
  • 数值反射率:台湾 CWA tw/grid 和 RainViewer 有线上获取与数值读回记录;RDCAP 单站产品已实现数值解码,三国在线能力仍未验收。
  • 数据导出:保存原始资料、PNG、NetCDF、GeoTIFF 或 Zarr,保留来源、时间和处理记录;科学格式取决于产品与几何支持。
  • 本地资料读写:读取数值文件,将明确声明的灰度编码图转为 dBZ;灰度转换不等于物理色标已验证。
  • 批量与缓存:批量查询和获取,复用缓存,跳过已有完整输出,支持取消操作。
  • Python SDK:提供同步、异步和批量接口,与 CLI 共用 Rust Engine。

Install

Rust CLI

原生 CLI 无需 Python。Cargo 安装会从源码编译,需要 Rust 1.92+、CMake、C/C++ 编译器及构建工具:

cargo install --locked --version 0.1.7 radiust-cli
radiust --version

Cargo 包名是 radiust-cli,可执行命令名是 radiust;~/.cargo/bin 需要在 PATH 中。Rust 项目可通过 cargo add radiust-core@0.1.7 使用同版本核心库。macOS 用户可用 xcode-select --install 准备编译工具,再用 brew install cmake 安装 CMake;完整前置依赖和 v0.1.7 发布验证记录见安装说明及发布记录。

Python SDK

使用 CPython 3.10–3.13。0.1.7 的预编译 wheel 覆盖 macOS Apple Silicon(macOS 11+)和 Linux x86_64(glibc ≥ 2.28),无需安装 Rust 或 CMake:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install "radiust==0.1.7"
python -m radiust --version
radiust --help

Python 包同时提供 radiust 命令和 SDK。需要 NumPy/xarray 转换时,安装 "radiust[science]==0.1.7";GeoTIFF、Zarr 及其他可选依赖见安装说明。同时安装独立 CLI 时,可用 python -m radiust 明确调用虚拟环境中的版本。

独立预编译

下载预编译程序即可使用,无需安装 Python 或 Rust。当前提供 v0.1.0 预览包,支持 macOS 11 及更新版本。下载、校验并安装到用户目录:

mkdir -p "$HOME/.local/bin"
workdir="$(mktemp -d)"
cd "$workdir"
curl -fL -O https://github.com/chorust/radiust/releases/download/v0.1.0/radiust-v0.1.0-macos-arm64.tar.gz
curl -fL -O https://github.com/chorust/radiust/releases/download/v0.1.0/radiust-v0.1.0-macos-arm64.sha256
shasum -a 256 -c radiust-v0.1.0-macos-arm64.sha256
tar -xzf radiust-v0.1.0-macos-arm64.tar.gz
install -m 755 radiust "$HOME/.local/bin/radiust"
export PATH="$HOME/.local/bin:$PATH"
radiust --help

校验通过后再解压安装。若新终端找不到 radiust,将上述 export PATH 行加入 ~/.zshrc。此预览包未经过 Apple 公证,首次运行可能出现 Gatekeeper 提示;处理方式及适用范围见完整安装说明。

这个 v0.1.0 旧预览包不包含 0.1.7 的全部变化;当前版本可通过上方 PyPI 或 Cargo 命令安装。

从源码安装

准备上述源码构建工具后,在仓库根目录运行:

git clone https://github.com/chorust/radiust.git
cd radiust
cargo install --locked --path crates/radiust-cli

Python 源码安装使用 python -m pip install ".",可选科学依赖使用 python -m pip install ".[science]"。后续版本由 GitHub tag 发布流程构建、验证并上传;各平台的实际发布状态见安装说明。

Usage

Config

在运行命令的目录创建 config.yaml,设置联网、缓存和默认输出:

runtime:
  allow_network: true
  request_timeout: 30  # 单次请求超时,单位:秒

cache:
  enabled: true
  dir: ~/.cache/radiust

storage:
  output: ./data

output:
  format: netcdf
  grid: native

CLI 和 SDK 会自动读取当前目录的 config.yaml。通用配置可放在 ~/.config/radiust/config.yaml;当前目录配置覆盖其中的同名字段,RADIUST_ 环境变量再覆盖文件配置。也可显式指定文件并查看生效配置:

radiust --conf ./config.yaml config show
radiust --conf ./config.yaml discover rainviewer --latest

allow_network: true 允许连接上游;只想临时开启时,可在当前终端运行 export RADIUST_RUNTIME__ALLOW_NETWORK=true。省略 --output 和 --format 时,下载使用配置中的默认值。更多选项见完整示例和配置说明。

Query

  • list:查询来源目录

    查看来源目录:

    radiust list sources
    
  • discover:查询最新时次

    配置好联网权限后,查询最新资料:

    radiust discover rainviewer --latest --max-age 3600
    

    --max-age 3600 筛选最近一小时的资料。报告中的时间为 UTC;latest 表示来源最新提供的帧,仍可能过期。凭据、浏览器或其他来源配置要求见数据来源文档。

  • cat:终端预览与本地资料

    # 查看 RainViewer 原始瓦片预览
    radiust cat rainviewer --latest --raw
    
    # 查看台湾 CWA 数值网格的反射率
    radiust cat tw --product grid --latest --dbz
    

    交互终端默认自动选择预览方式;重定向、脚本或只需元数据时加 --renderer text。--raw、--gray 和 --dbz 是不同模式,不根据图像外观自动推断。

    查看已有数值文件:

    radiust cat --file ./reflectivity.nc --dbz --variable reflectivity --renderer text
    
  • download:保存图像或数值资料

    # PNG 图像及元数据
    radiust download rainviewer --latest --format png --output ./data
    
    # 数值反射率,同时保留同次获取的原始资料
    radiust download tw --product grid --latest --format netcdf --raw --output ./data
    
    # 只保存来源原始资料,不请求科学解码
    radiust download tw-http --latest --station CV1_3600 --raw-only --output ./raw
    

    下载报告会列出实际输出路径。同一帧已有完整输出时,再次下载会报告 skipped。数值产品也可用 --format geotiff 或 --format zarr;不同来源的科学与几何限制仍适用。自动化处理加 --json 获取结构化报告。

本地灰度编码、多帧选取、批量发现、时间范围、缓存与配置的完整用法见CLI 文档;输出文件和清单规则见输出维护说明。

SDK

下面的示例连接 RainViewer,查询最新帧,读取数值场并下载 NetCDF:

from datetime import timedelta

import radiust

query = radiust.Query("rainviewer", latest=True, max_age=timedelta(hours=1))

with radiust.Client(config={"runtime": {"allow_network": True}}) as client:
    refs = client.discover(query)
    field = client.fetch(query)  # 获取并解码到内存
    report = client.download(
        query, output="./data", format="netcdf", raw=True,
    )

fetch() 返回 Rust 持有的 RadarField/RadarDataset;download() 写入正式输出。安装 science 可选依赖后,用 radiust.to_xarray(field) 转为 xarray。异步入口、批量、取消、本地 read_dbz() 和 write() 见SDK 文档。

项目与许可

Radiust 优先接入官方来源,也支持可靠、可追溯的第三方产品。当前先做好观测;Desktop 查看与播放、多源选择与回退、预测和跨来源拼图属于后续路线。

项目理念 · 发展路线与 Desktop 验收目标 · 架构 · 规格路线

软件采用标准 Apache-2.0,允许商业使用。上游数据的访问、署名、商用与再分发条件按来源另行记录,未确认项保持未确认;软件许可不替代数据授权。名称与标识的使用见品牌规则。

Dev

在仓库根目录安装开发依赖并运行检查:

uv sync --group dev
.venv/bin/ruff check python tests
cargo fmt --all -- --check
cargo test --workspace
.venv/bin/pytest -q

默认测试禁止公网。需要无网络样本试用时,见离线 quickstart。该文档包含历史迁移流程,当前安装方式以本文为准。live/provider、真实终端、远端存储与平台验收分别记录;离线测试通过不代表这些验收完成。迁移限制见迁移说明和 migration/blockers/。

Metadata

Release files for radiust 0.1.9

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 radiust 0.1.9
File Actions
radiust-0.1.9-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for radiust-0.1.9-cp313-cp313-manylinux_2_28_x86_64.whl
radiust-0.1.9-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for radiust-0.1.9-cp313-cp313-macosx_11_0_arm64.whl
radiust-0.1.9-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for radiust-0.1.9-cp312-cp312-manylinux_2_28_x86_64.whl
radiust-0.1.9-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for radiust-0.1.9-cp312-cp312-macosx_11_0_arm64.whl
radiust-0.1.9-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for radiust-0.1.9-cp311-cp311-manylinux_2_28_x86_64.whl
radiust-0.1.9-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for radiust-0.1.9-cp311-cp311-macosx_11_0_arm64.whl
radiust-0.1.9-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for radiust-0.1.9-cp310-cp310-manylinux_2_28_x86_64.whl
radiust-0.1.9-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for radiust-0.1.9-cp310-cp310-macosx_11_0_arm64.whl

Total release size: 132.7 MB

Release files / radiust-0.1.9-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL radiust-0.1.9-cp313-cp313-manylinux_2_28_x86_64.whl
Size 18.3 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
293a071bce995956129f49306db59b5e1e93714f9feacf4408dec6212b0adc76
BLAKE2b-256 checksum
How to use checksums
475a010658e1065ff5c0d5d4fca71ab5ae6b4621736fa0c9c6f6bf1a3b952ccf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp313-cp313-macosx_11_0_arm64.whl

Download URL radiust-0.1.9-cp313-cp313-macosx_11_0_arm64.whl
Size 14.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
da418bd75e36c69aa526f54ed3b2faa1470bf8d4f9f6bb2d44e228819ffaa84f
BLAKE2b-256 checksum
How to use checksums
09f4e7bab1c9a57c77eb791a877a84d6540f087db41feafa0add934cc6767970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL radiust-0.1.9-cp312-cp312-manylinux_2_28_x86_64.whl
Size 18.3 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b6e086516fe3c92e4094857f48d89918a3ac6519ac861a3bdd7d777fa85b1f99
BLAKE2b-256 checksum
How to use checksums
92bbd28a3f8cb59cbf623bb5cc45c409f74dc9c66fab9aabc023d3881340606b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp312-cp312-macosx_11_0_arm64.whl

Download URL radiust-0.1.9-cp312-cp312-macosx_11_0_arm64.whl
Size 14.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
35067da56036faec0385007d29626f227361995f46e87900e37f6beefb191bca
BLAKE2b-256 checksum
How to use checksums
0ad8ebee3e14595f0278cacc16e484c2d01c1f35970935d67c1370207e1f6ecb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL radiust-0.1.9-cp311-cp311-manylinux_2_28_x86_64.whl
Size 18.3 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
03087f7f7a867284ee281f7ae70b3f64cae4a723df98fbb8eaf515a5b3fb7b6e
BLAKE2b-256 checksum
How to use checksums
b497912362c8b3d289c97999221afa11f17431c9efdb15edf2fef23852fdf58c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp311-cp311-macosx_11_0_arm64.whl

Download URL radiust-0.1.9-cp311-cp311-macosx_11_0_arm64.whl
Size 14.9 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
473efa2b0615ea25fc0b9458fc4b1e3da8045dbe21fbf30cbc5682a960a82088
BLAKE2b-256 checksum
How to use checksums
9135e7341b7df8b8e9678d7f88b654691c2e81e2b90cb76155e71bd8b8285c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL radiust-0.1.9-cp310-cp310-manylinux_2_28_x86_64.whl
Size 18.3 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bacfb753adc3d3eb4bf3c993a31d8db191fd45c018bae858eba32ef0d2b277b1
BLAKE2b-256 checksum
How to use checksums
f93385414437d3f879b2757c1d7a4767d6da2b0a0de8f48b98e02cb4a5db63d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / radiust-0.1.9-cp310-cp310-macosx_11_0_arm64.whl

Download URL radiust-0.1.9-cp310-cp310-macosx_11_0_arm64.whl
Size 14.9 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ce68aba88949ae4beac6c49107371063a30a34ee4b60e415fa0a18383be2f095
BLAKE2b-256 checksum
How to use checksums
9e5f49bc2f997556e7983d960478b03bc6844c631a7ddf882a163cd814396ce0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for radiust 0.1.9

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for radiust-0.1.9-cp313-cp313-manylinux_2_28_x86_64.whl

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 Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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