--- id: pynws version: "2.1.0" license: MIT license_treatment: permissive maintenance: active --- # pynws — Python library to retrieve observations and forecasts from NWS/NOAA License: permissive · Maintenance: active · Downloads: 75.6K/mo ## 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 above — 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 pip install pynws uv add pynws poetry add pynws ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 75.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags NWS NOAA weather API client, async weather observations, national weather service python, weather forecast retrieval, NOAA weather data library, real-time weather observations, weather alerts and forecasts, weather-api, async-http, noaa [View on SkillFed](https://skillfed.io/packages/pynws) · [View on PyPI](https://pypi.org/project/pynws/)