Skip to main content

NWS-APy: A Pythonic Implementation of the National Weather Service API

NWS-APy (APy for short) takes a pythonic approach to retrieving (GET) and organizing data using the National Weather Service API (found here: https://www.weather.gov/documentation/services-web-api#/)

There are 3 goals that the package aims to achieve:

  • Keep clean, simplistic, minimalistic, and consistent code on the user end.
  • Minimize potential 404/500 errors and knowledge overhead.
  • Format output to popular meteorological data types.

A simple example

APy is designed to be simple and easy to use. For example, if we wanted to get all of the tornado warnings in Oklahoma and just display the headline:

from nwsapy import api_connector

tor_warnings = api_connector.get_active_alerts(event = "Tornado Warning", area = "OK")

# Check to make sure there aren't any request errors.
# If so, let the user know by raising an error.
if tor_warnings.has_any_request_errors:
    raise ConnectionError(f'Details: {tor_warnings['detail']})

# iterate through all of the tornado warnings in Oklahoma and print the headline.
for warning in tor_warnings:
    print(warning.headline)

Documentation

Documentation for NWSAPy be found here

Contact/Support

I want to hear from you. If you have any questions regarding the package usage, please send me an email. If you encounter an issue, please open an issue on GitHub.

Metadata

Release files for nwsapy 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nwsapy 1.0.3
File Size Uploaded
nwsapy-1.0.3.tar.gz 50.1 kB Details

Release files / nwsapy-1.0.3.tar.gz

Download URL nwsapy-1.0.3.tar.gz
Size 50.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ea6eca848d2f0f57575c82b4568ee6f0022e70b3bb160393f46865f1b5b39a17
BLAKE2b-256 checksum
How to use checksums
94cbda192bcb46ff49741827dfdaeb99c8d1aeb6df81b6d5b3ac209884d4ef37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page