Skip to main content

Python library to retrieve observations and forecasts from NWS/NOAA

Project description


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


import asyncio
import aiohttp
import pynws

PHILLY = (39.95, -75.16)

async def defaults():
    async with aiohttp.ClientSession() as session:
        nws = pynws.Nws(session, latlon=PHILLY, userid=USERID)
        stations = await nws.stations()
        nws.station = stations[0]
        observations = await nws.observations()
        forecast = await nws.forecast()

loop = asyncio.get_event_loop()
nws = loop.run_until_complete(defaults())

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pynws-0.6-py3-none-any.whl (4.6 kB) Copy SHA256 hash SHA256 Wheel py3
pynws-0.6.tar.gz (3.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page