Skip to content

Instantly share code, notes, and snippets.

@aranhaagency
Created October 10, 2019 00:56
Show Gist options
  • Save aranhaagency/0676241d749261a652a320fe397e13d6 to your computer and use it in GitHub Desktop.
Save aranhaagency/0676241d749261a652a320fe397e13d6 to your computer and use it in GitHub Desktop.
python3 api2.py
days ['2019-10-09 00:00', '2019-10-10 00:00', '2019-10-11 00:00', '2019-10-12 00:00', '2019-10-13 00:00', '2019-10-14 00:00', '2019-10-15 00:00']
city RiodeJaneiro-RJ
lat -22.9
lon -43.21
forecast
temperature_daily_min [19.410934448242188, 21.39223289489746, 21.575525283813477, 21.672334671020508, 15.769083976745605, 20.24126625061035, 19.649658203125]
temperature_daily_max [27.048219680786133, 29.162296295166016, 31.381961822509766, 32.43083572387695, 30.856060028076172, 26.82887077331543, 27.621248245239258]
rel_humidity_daily_avg [75.39779663085938, 69.5989761352539, 67.29695129394531, 65.62218475341797, 67.78164672851562, 73.90571594238281, 70.84415435791016]
Traceback (most recent call last):
File "api2.py", line 44, in <module>
max_temperature = str(json_res_observer['points']['observed']['max_temperature'])
KeyError: 'points'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment