weathervane
Weather data, air quality, and alerts from public APIs. Fetches, parses, and returns clean Rust types.
A standalone Rust library crate that handles data fetching, response parsing, unit conversions, geographic detection, and weather domain types. No UI dependencies, no polling, no timers, no config storage. Frontends call the async functions when they're ready and pass in whatever parameters they need.
What it does
- Fetches weather data, air quality, and alerts from Open-Meteo, NWS, MeteoAlarm, ECCC, and BOM
- IP-based location detection and city search via geocoding
- Unit types (temperature, pressure, measurement system) with conversions
- Weather condition and compass direction enums for frontend translation mapping
- Network connectivity monitoring via NetworkManager D-Bus signals
- Time formatting and date parsing utilities
Usage
Add the dependency to your Cargo.toml:
[]
= "0.1"
use ;
let weather = fetch_weather.await?;
println!;
Building
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.