A Python Wrapper for Yahoo Weather API
Documentation for the API is avilable here
pip install py_yahoo
from py_yahoo import YWeather
yw=YWeather()
#set the location
#check the yahoo weather website for the list of supported cities
yw.weatherat("avinashi")
#set the unit 'c'-->celsius 'f'-->fahrenheit(default)
yw.unit("c")
w=yw.getweather()
print(w.getatmosphere()) #{'humidity': '58', 'pressure': '1013.0', 'rising': '0', 'visibility': '16.1'}
The following are the list of available methods
- getlastbuilddate()
- getatmosphere()
- forecast()
- getlatitude()
- getlongitude()
- getlocation()
- getunits()
- getastronomy()
- getwind()
- weatheratwhatdatetime()
- getstatus()
- gettemp()