Skip to main content

Python library for yahoo weather new API

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for yahoo-weather, version 1.0.7
Filename, size File type Python version Upload date Hashes
Filename, size yahoo_weather-1.0.7-py3-none-any.whl (13.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size yahoo_weather-1.0.7.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page