Skip to main content

pynws

A python library to asynchronously retrieve weather observation from NWS/NOAA.

PyPI - Downloads

Example

See example.py for a runnable example.

PHILLY = (39.95, -75.16)
USERID = "testing@address.xyz"

async def example():
    async with aiohttp.ClientSession() as session:
        nws = pynws.SimpleNWS(*PHILLY, USERID, session)
        await nws.set_station()
        await nws.update_observation()
        await nws.update_forecast()
        await nws.update_alerts_forecast_zone()
        print(nws.observation)
        print(nws.forecast[0])
        print(nws.alerts_forecast_zone)

Functionality

pynws exposes the ability to retrieve raw data using raw_data module. Nws class offers ability to retrieve minimally processed data for a single location. SimpleNWS class offers data caching and several other helpers for interpreting output.

Units for Observations in SimpleNWS

NWS API does not expose all possible units for observations. Known units are converted to the following:

unit type known NWS units pynws unit
temperature degF, degC Celsius
pressure Pa Pascal
speed m_s-1, km_h-1 km_h-1
percent percent percent
angle degree_(angle) degrees
distance m meter

Metadata

Release files for pynws 2.1.0

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

Source distribution (sdist)

Source distribution for pynws 2.1.0
File Size Uploaded Provenance Actions
pynws-2.1.0.tar.gz 44.7 kB With provenance Details for pynws-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pynws 2.1.0
File Interpreter ABI Platform Actions
pynws-2.1.0-py3-none-any.whl Python 3 none any Details for pynws-2.1.0-py3-none-any.whl

Total release size: 61.9 kB

Release files / pynws-2.1.0.tar.gz

Download URL pynws-2.1.0.tar.gz
Size 44.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4fcf8547ac6b202de9b201ed17849cf6d4efcb4af84650e37d6308eed97304d9
BLAKE2b-256 checksum
How to use checksums
c25f08a5d813086fab7f1ab8e7d8979827c41785cde6c9342322778e83f61192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Apr 24, 2025.

Transparency log

Release files / pynws-2.1.0-py3-none-any.whl

Download URL pynws-2.1.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c21004f3d12a31b0ac121d228c2ced5b53d84ec326072c699de3487f4616a6e
BLAKE2b-256 checksum
How to use checksums
f0950f0131838539b0786286f9000bfccc7424b7e164f2a221e7f456e5f58494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Apr 24, 2025.

Transparency log

Security for pynws 2.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.

Select from 2 files

Attestation for pynws-2.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 Apr 24, 2025.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files Full provenance

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