Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

M-Ahadi/yahoo_weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Library for Yahoo Weather (New API)

On 3 Jan 2019 Yahoo changed its Weather API to use OAuth1 Authentication. This new method requires authentication to use the API. This library helps you to handle the new API. In order to use the new API you have to get an API key from Yahoo!

from yahoo_weather.weather import YahooWeather
from yahoo_weather.config.units import Unit

data = YahooWeather(APP_ID="Your App ID",
                     api_key="Your API KEY",
                     api_secret="Your API secret")
                     
data.get_yahoo_weather_by_city("tehran", Unit.celsius)
print(data.condition.text)
print(data.condition.temperature)

data.get_yahoo_weather_by_location(35.67194, 51.424438)
print(data.condition.text)
print(data.condition.temperature)

About

This a library to use new yahoo weather API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages