Python library to retrieve observations and forecasts from NWS/NOAA
A python library to asynchronously retrieve weather observation from NWS/NOAA.
See example.py for a runnable example.
PHILLY = (39.95, -75.16) USERID = "email@example.com" async def example(): async with aiohttp.ClientSession() as session: nws = pynws.SimpleNWS(*PHILLY, USERID, session) await nws.set_station() await nws.update_observation() await nws.update_forecast() await nws.update_alerts_forecast_zone() print(nws.observation) print(nws.forecast) print(nws.alerts_forecast_zone)
pynws exposes the ability to retrieve raw data using
Nws class offers ability to retrieve minimally processed data for a single location.
SimpleNWS class offers data caching and several other helpers for interpreting output.
Units for Observations in SimpleNWS
NWS API does not expose all possible units for observations. Known units are converted to the following:
|unit type||known NWS units||pynws unit|
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.