Skip to content
/ pynws Public
forked from MatthewFlamm/pynws

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

License

Notifications You must be signed in to change notification settings

elwing00/pynws

 
 

Repository files navigation

pynws

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

Example

import asyncio
import aiohttp
import pynws

PHILLY = (39.95, -75.16)
USERID = '[email protected]'

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())

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%