pynws
Python library to retrieve observations and forecasts from NWS/NOAA
What it is and what it does
pynws is a Python library that wraps the National Weather Service (NWS/NOAA) API to retrieve weather data asynchronously. It provides two main interfaces: a lower-level `Nws` class for minimally processed data and a higher-level `SimpleNWS` class that adds data caching and unit normalization. The library converts NWS observations into standardized units (Celsius for temperature, Pascal for pressure, km_h-1 for wind speed, etc.) and allows you to fetch current observations, forecasts, and weather alerts for a specific geographic location.
The package depends on aiohttp for HTTP requests, yarl for URL handling, and metar for parsing meteorological data. It targets modern Python (3.9+) and is actively maintained. With low install friction and no known vulnerabilities, it is straightforward to integrate into weather-aware applications.
Use it for:
- Build a weather dashboard or home automation system that polls NWS for current conditions and alerts.
- Integrate real-time weather forecasts into a mobile or web app without managing your own weather data.
- Monitor weather alerts for a specific forecast zone to trigger notifications or automated responses.
- Retrieve standardized meteorological observations for data analysis or logging.
- Create a weather-aware scheduling system that adjusts plans based on NWS forecasts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asynchronously fetch weather observations, forecasts, and alerts from the National Weather Service (NWS/NOAA) API for a given location.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a specific problem (async NWS data retrieval) with a clean API. It is suitable for weather-aware applications, home automation, and data collection. No known security vulnerabilities indicate reliable use.
Install
pynws on PyPI
pip
pip install pynwsuv
uv add pynwspoetry
poetry add pynwsInstalling pynws
Before you install
Low install friction with pure Python wheels. Actively maintained with a recent commit (2026-08-03) and steady release cadence. Supports current Python versions (3.9–3.13).
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
import aiohttp
import pynws
async def get_weather():
async with aiohttp.ClientSession() as session:
nws = pynws.SimpleNWS(39.95, -75.16, "user@example.com", session)
await nws.set_station()
await nws.update_observation()
print(nws.observation)
Requires an async context (asyncio event loop) and a valid user-agent string (email) for NWS API requests.
Verify before relying
- Whether SimpleNWS caching behavior and update frequency are documented or configurable.
- Rate limits or throttling behavior when making repeated NWS API calls.
- Availability of detailed error handling or retry logic for network failures.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — aiohttp, metar, yarl |
| Maintenance | actively maintained — 477 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 75,626/month — #14,695 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pynws-2.1.0-py3-none-any.whl
Keywords: nws, weather
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
accuweatherAsync Python wrapper for fetching current…
permissive · top 15,000 on PyPI
env_canadaProvides async access to Environment Canada…
permissive · top 15,000 on PyPI
pyowmPyOWM is a Python client library that wraps…
permissive · top 15,000 on PyPI
meteofrance-apiPython client for the private Météo-France API,…
permissive · top 15,000 on PyPI
meteomaticsConnects Python applications to the Meteomatics…
permissive · top 15,000 on PyPI
open-meteoProvides an asynchronous Python client for…
permissive · top 15,000 on PyPI
irm-kmi-apiAsync Python client to fetch current weather,…
permissive · top 15,000 on PyPI
openmeteo-requestsFetches weather data from the Open-Meteo API…
permissive · top 15,000 on PyPI
PyFlumePyFlume provides Python bindings to interact…
permissive · top 15,000 on PyPI
aioecowittProvides an async Python wrapper for the…
permissive · top 15,000 on PyPI