Python library to retrieve observations and forecasts from NWS/NOAA
Project description
pynws
A python library to asynchronously retrieve weather observation from NWS/NOAA.
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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pynws-2.1.0.tar.gz
.
File metadata
- Download URL: pynws-2.1.0.tar.gz
- Upload date:
- Size: 44.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4fcf8547ac6b202de9b201ed17849cf6d4efcb4af84650e37d6308eed97304d9
|
|
MD5 |
fd351b0b5d1f3b7ea30ad1bdba7e06fb
|
|
BLAKE2b-256 |
c25f08a5d813086fab7f1ab8e7d8979827c41785cde6c9342322778e83f61192
|
Provenance
The following attestation bundles were made for pynws-2.1.0.tar.gz
:
Publisher:
pythonpublish.yml
on MatthewFlamm/pynws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
pynws-2.1.0.tar.gz
-
Subject digest:
4fcf8547ac6b202de9b201ed17849cf6d4efcb4af84650e37d6308eed97304d9
- Sigstore transparency entry: 202236284
- Sigstore integration time:
-
Permalink:
MatthewFlamm/pynws@9176abc33ae73fcd7717887004782c5dbdc4526b
-
Branch / Tag:
refs/tags/v2.1.0
- Owner: https://github.com/MatthewFlamm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
pythonpublish.yml@9176abc33ae73fcd7717887004782c5dbdc4526b
-
Trigger Event:
release
-
Statement type:
File details
Details for the file pynws-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: pynws-2.1.0-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4c21004f3d12a31b0ac121d228c2ced5b53d84ec326072c699de3487f4616a6e
|
|
MD5 |
8e48e62ab0b85cc668ce0fa69e910eba
|
|
BLAKE2b-256 |
f0950f0131838539b0786286f9000bfccc7424b7e164f2a221e7f456e5f58494
|
Provenance
The following attestation bundles were made for pynws-2.1.0-py3-none-any.whl
:
Publisher:
pythonpublish.yml
on MatthewFlamm/pynws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
pynws-2.1.0-py3-none-any.whl
-
Subject digest:
4c21004f3d12a31b0ac121d228c2ced5b53d84ec326072c699de3487f4616a6e
- Sigstore transparency entry: 202236289
- Sigstore integration time:
-
Permalink:
MatthewFlamm/pynws@9176abc33ae73fcd7717887004782c5dbdc4526b
-
Branch / Tag:
refs/tags/v2.1.0
- Owner: https://github.com/MatthewFlamm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
pythonpublish.yml@9176abc33ae73fcd7717887004782c5dbdc4526b
-
Trigger Event:
release
-
Statement type: