/addsPy

Library for pulling data from the ADDS data server (http://aviationweather.gov/dataserver)

Primary LanguagePython

addsPy

This is just a little client library I've been poking at to get data from the Aviation Digital Data Service (ADDS) text data server.

Supported Endpoints

Currently, the library only supports METARs and Aircraft/Pilot Reports.

The current data source map is as so:

  • METARs: metars
  • Aircraft / Pilot Reports: aircraftreports
  • TAFs: tafs
  • AIRMETS / SIGMETS: airsigmets
  • Stations: stations

Usage

Here's an example to get the METARs for the last hour from KOZW:

from addsPy import Client

req_params = {
    'stationString': 'kozw',
    'hoursBeforeNow': 1
}

ozw_wx = Client(datasource='metars', **req_params)
ozw_wx.request()

From there, you get the raw return as specified by the docs. For example, here is the docs regarding output for METARS. Basically, this gets stuffed into the wxdata property.

So for example, if you wanted to iterate through the text of the METARs:

for metar in ozw_wx.wxdata['data']['METAR']:
    print('{station}: {raw}'.format(station=metar['station_id'], raw=metar['raw_text']))

References

To see the various request parameters and output examples see here.