Note: avwx
is no longer being maintained. Please see Michael duPont's
package avwx-engine
.
This library is in development and should not be relied upon as a primary aviation resource.
This library relies upon the ADDS service by the NOAA.
Note: This library supports only Python 3 as of version 1.0.0.
pip install avwx
Check out an example of how you could use this library: avwxsummarizer
from avwx.models import MetarSet
# Initializes METAR
jfk_metars = MetarSet('KJFK')
# Grabs METAR data from ADDS service.
jfk_metars.refresh()
latest_jfk_metar = jfk_metars.get_latest()
# Print the raw text of the METAR
print latest_jfk_metar.raw_text
# Print an exploded summary of the METAR to see what kinds of
# attributes you can access.
print latest_jfk_metar.detail_string()
(Based on ADDS METAR data type)
raw_text
station
--WeatherStation
objectobservation_time
-- time the METAR was created (Pythondatetime
object)temp
-- temperature (in Celsius)dewpoint
(in Celsius)wind
--Wind
objectvisibility
(in statute miles)altimeter
-- altimeter pressure setting (in inches of mercury)flight_category
-- e.g. VFR, LIFR, etc.cloud_layers
--CloudLayerSet
object
(Based on ADDS TAF data type)
raw_text
station
--WeatherStation
objectissue_time
bulletin_time
valid_time_from
valid_time_to
remarks
forecast
--TafForecast
object
time_from
-- the start of the forecast timetime_to
-- the end time of the forecastchange_indicator
-- one of the following:ChangeIndicator.TEMPORARY
ChangeIndicator.BECOMING
ChangeIndicator.FROM
ChangeIndicator.PROBABLE
time_becoming
probability
-- percent probability (e.g. 70)wind
--Wind
objectvisibility
-- horizontal visibility (in statute miles)altimeter
(in inches of mercury)vertical_visibility
(in feet)wx_string
-- additional weathernot_decoded
-- information that wasn't decodedcloud_layers
--CloudLayerSet
object
direction
(in degrees)speed
(in knots)gust
(in knots)
latitude
longitude
elevation
-- elevation of reporting station (in feet)
- AIRMETs / SIGMETs
- Testing