get weather data python code example

Example 1: python get weather temperature

import pyowm
owm = pyowm.OWM()
observation = owm.weather_at_place('London,uk')
w = observation.get_weather()
w.get_wind()
w.get_humidity()
################
# Run
>>> {u'speed': 3.1, u'deg': 220}
>>> 76

Example 2: python weather api

>>> import pyowm
>>> owm = pyowm.OWM()
>>> observation = owm.weather_at_place('London,uk')
>>> w = observation.get_weather()
>>> w.get_wind()
{u'speed': 3.1, u'deg': 220}
>>> w.get_humidity()
76