pynwsdata provides access to the API Web Service of the
National Weather Service.
API data coverage incldues:
- Weather alerts
- Significant Meteorological Advisory (SIGMET) information for aviation
- Weather Forecast Office (WFO) metadata
- Weather forecasts (2.5 km grid)
- Terminal Aerodrome Forecast (TAFS) information for aviation
- Weather headlines (News, WFO headlines)
- Information and textual data for specific text products
- e.g Hydrometeorological Automated Data System, HADS reports (raw JSON)
- Weather observations (latest and historic)
Examples are available in the examples source directory
Source code is available at GitHub: pyecolog/pynwsdata
pynwsdata is developed for Python 3.10 and subsequent
Dependencies include:
httpcore- For SOCKS proxy support, please install
httpcore[socks]
- For SOCKS proxy support, please install
xarraypintpint-xarraygeopyujsonpyfields
This project uses pyproject.toml and can be installed with setuptools, using pip install
Tests have been provided with pytest
FIXME the tests from the generated sources have not been updated for recent source revisions
-
API discovery: https://www.weather.gov/documentation/services-web-api
-
Discussion, Gridpoints in the API: https://weather-gov.github.io/api/gridpoints
-
WMO Units of Measure: https://codes.wmo.int/common/unit
This project is developed by Sean Champ <spchamp@users.noreply.github.com>
-
This project is neither affiliated with nor endorsed by the National Weather Service
-
This software includes information describing units of measure, derived from WMO No. 306 Vol I.2 Common Code-table C-6 List of units for TDCFs as published under the Open Government License, version 3
The Python source code for this package was originally generated using the OpenAPI Generator
- API version:
1.13.1 - Generator version:
7.7.0 - Build package:
org.openapitools.codegen.languages.PythonClientCodegen
OpenAPI schema availability: Please refer to the api.weather.gov General FAQs
Proceeding from the generated sources, subsequent revisions have included:
-
Adding a custom API object type, using pyfields for API object fields. This was in lieu of the original dependency on Pydantic
-
Adding support for abstract API object types. In effect, this is an extension to the original OpenAPI description, for API object types with common fields and types appearing under a generalized base class in the formal API definition.
-
Updating the API client model to suport server redirects and paged responses
-
HTTP/2 for API access, using HTTPCore
-
ujson for JSON processing
Additional Features:
A partial listing of other projects providing an API for weather information in Python: