Last active
May 26, 2022 17:36
-
-
Save ephsmith/5fd1f124a7d29ee7443e1b67ddfd8a56 to your computer and use it in GitHub Desktop.
Coding 1 - Cached Request Response JSON for dictionary examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aeris_response.py | |
# response_dict is the dictionary returned from a requests.Response.json() method | |
# call. | |
# | |
# Details regarding the response fields can be found at: | |
# https://www.aerisweather.com/support/docs/api/reference/endpoints/observations/#response | |
response_dict = { | |
"success": True, | |
"error": None, | |
"response": { | |
"id": "LFPV", | |
"dataSource": "METAR_NOAA", | |
"loc": {"long": 2.2, "lat": 48.766666666667}, | |
"place": { | |
"name": "villacoublay/vel", | |
"city": "villacoublay/vel", | |
"state": "", | |
"country": "fr", | |
}, | |
"profile": { | |
"tz": "Europe/Paris", | |
"tzname": "CEST", | |
"tzoffset": 7200, | |
"isDST": True, | |
"elevM": 179, | |
"elevFT": 587, | |
}, | |
"obTimestamp": 1653579000, | |
"obDateTime": "2022-05-26T17:30:00+02:00", | |
"ob": { | |
"type": "station", | |
"timestamp": 1653579000, | |
"dateTimeISO": "2022-05-26T17:30:00+02:00", | |
"recTimestamp": 1653579208, | |
"recDateTimeISO": "2022-05-26T17:33:28+02:00", | |
"tempC": 19, | |
"tempF": 66, | |
"dewpointC": 11, | |
"dewpointF": 52, | |
"humidity": 60, | |
"pressureMB": 1025, | |
"pressureIN": 30.26, | |
"spressureMB": 1003, | |
"spressureIN": 29.63, | |
"altimeterMB": 1025, | |
"altimeterIN": 30.27, | |
"windKTS": 10, | |
"windKPH": 19, | |
"windMPH": 12, | |
"windSpeedKTS": 10, | |
"windSpeedKPH": 19, | |
"windSpeedMPH": 12, | |
"windDirDEG": 270, | |
"windDir": "W", | |
"windGustKTS": None, | |
"windGustKPH": None, | |
"windGustMPH": None, | |
"flightRule": "VFR", | |
"visibilityKM": 48.2802, | |
"visibilityMI": 30, | |
"weather": "Mostly Cloudy", | |
"weatherShort": "Mostly Cloudy", | |
"weatherCoded": "::BK", | |
"weatherPrimary": "Mostly Cloudy", | |
"weatherPrimaryCoded": "::BK", | |
"cloudsCoded": "BK", | |
"icon": "mcloudy.png", | |
"heatindexC": 18.9, | |
"heatindexF": 66, | |
"windchillC": 18.9, | |
"windchillF": 66, | |
"feelslikeC": 18.9, | |
"feelslikeF": 66, | |
"isDay": True, | |
"sunrise": 1653537430, | |
"sunriseISO": "2022-05-26T05:57:10+02:00", | |
"sunset": 1653593959, | |
"sunsetISO": "2022-05-26T21:39:19+02:00", | |
"snowDepthCM": None, | |
"snowDepthIN": None, | |
"precipMM": None, | |
"precipIN": None, | |
"solradWM2": 368, | |
"solradMethod": "estimated", | |
"ceilingFT": 3200, | |
"ceilingM": 975.36, | |
"light": 37, | |
"uvi": None, | |
"QC": "O", | |
"QCcode": 10, | |
"trustFactor": 100, | |
"sky": 81, | |
}, | |
"raw": "METAR LFPV 261530Z AUTO 27010KT 240V300 9999 BKN032 19/11 Q1025 NOSIG", | |
"relativeTo": { | |
"lat": 48.85341, | |
"long": 2.3488, | |
"bearing": 228, | |
"bearingENG": "SW", | |
"distanceKM": 14.552, | |
"distanceMI": 9.042, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added minor documentation and a link to the endpoint/response documentation.