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
# Get Weather in Python
# pip install python-weather
import asyncio
import python_weather as weather
async def Get_Weather():
client = weather.Client(format= weather.IMPERIAL)
w = await client.find("New York")
print("Temperature: ", w.current.temperature)
for forecast in w.forecasts:
print("Forecast: ", forecast.sky_text, forecast.temperature)
await client.close()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(Get_Weather())