nws-wwa
Download the current watches, warnings and advisories from the National Weather Service (NWS) as GeoJSON or typed Python records.
This is a copy of NWS data, not an official alert. The files can be minutes old, and a download can fail. For anything that affects safety, use NWS itself: weather.gov, NOAA Weather Radio or Wireless Emergency Alerts.
Install
uv add nws-wwa
Use it from the command line
nwswwa all > all.json
nwswwa hazards --timeout 120
nwswwa warnings --verbose > warnings.json
The commands are all, hazards and warnings. Each prints GeoJSON. --verbose prints each request to standard error, so it never mixes into the JSON.
Use it from Python
import nws_wwa
data = nws_wwa.get_all() # GeoJSON
records = nws_wwa.get_alert_records("hazards") # typed records
print(records[0].product_type, records[0].office, records[0].expires_at)
get_all, get_hazards and get_warnings work as they always have. get_alert_records is new. It gives you Alert records with numbers already parsed and times in UTC.
Use your own request function
Some projects send every web request through their own helper, for shared retries, logging or proxy settings. Pass that helper as get and the package will use it instead of requests.get. It is called like get(url, timeout=seconds) and must return something with a status_code and the file's content as bytes. The timeout and the retries still work, and failures still raise NWSError.
import requests
import nws_wwa
from nws_wwa import Reply
def my_get(url: str, *, timeout: float) -> Reply:
print("Asking for", url)
return requests.get(url, timeout=timeout, headers={"User-Agent": "my-project"})
data = nws_wwa.get_all(get=my_get)
The Fetcher and Reply types describe this, so a type checker can confirm your function fits. If your function raises one of the requests library's errors, such as a timeout, the package tries again just as it does for its own requests. Any other error is passed on to you.
Working on the code
This repository's full history is about 12.9 GB on GitHub, because the scraped data files were saved to it for years. Copy only the latest version:
git clone --depth 1 https://github.com/datadesk/nws-wwa.git
The automated checks do the same, so the version number comes from a tag only on a tagged release.
Things to know
- It is a copy, and it can be old. NWS rewrites the files every few minutes, but this package only downloads when you ask it to.
- Python 3.11 to 3.14 work. The shapefiles are read with pyogrio and shapely, which need numpy, so the install is about 110 MB larger than before.
- Downloads retry. A request waits 60 seconds, then tries again on network errors and server errors, and raises
nws_wwa.NWSErrorif it still fails. - The same alert can fill several rows. Count alerts by
CAP_IDorVTEC, not by rows. - The data comes from NWS. NWS says its web pages are in the public domain and provided "as is". The documentation quotes its disclaimer. The code is MIT.
- AI helped write this package. AI tools assisted in writing its code, tests and documentation. A person directed and reviewed the work.
The documentation has the full field reference and what each kind of product means.
Links
- Docs: palewi.re/docs/nws-wwa/
- Source data: tgftp.nws.noaa.gov/SL.us008001/DF.sha/DC.cap/DS.WWA/
- Issues: github.com/datadesk/nws-wwa/issues
- Packaging: pypi.python.org/pypi/nws-wwa
- Testing: github.com/datadesk/nws-wwa/actions
Metadata
Release files for nws-wwa 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nws_wwa-1.1.0.tar.gz | 160.5 kB | With provenance | Details for nws_wwa-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nws_wwa-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for nws_wwa-1.1.0-py3-none-any.whl |
Total release size: 175.8 kB
Release files / nws_wwa-1.1.0.tar.gz
| Download URL | nws_wwa-1.1.0.tar.gz |
|---|---|
| Size | 160.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbf9d594977907551e8bc58e83037cbb450aefe45d034ac3201b8a2ef9603215
|
|
BLAKE2b-256 checksum How to use checksums |
b1dd72062c43a64427c1d2ecfa950c317ab8f151a204c775dc6296fcc97494cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / nws_wwa-1.1.0-py3-none-any.whl
| Download URL | nws_wwa-1.1.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b8938fb9dfdf1fb585966be4d21da6d90272c01e1a078cf5ada4b9c4e268842
|
|
BLAKE2b-256 checksum How to use checksums |
13c5e028c151be01c881afdfd5232f4227269983584d04afca3712d5d142a748
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for nws-wwa 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nws_wwa-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.