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
pynws-2.1.0.tar.gz 44.7 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6

2 release files

0.5

2 release files

0.1

2 release files

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