A python wrapper for the Yahoo weather API
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
weatherpy
.gitignore
CHANGELOG.txt
LICENCE.txt
MANIFEST.in
README.md
setup.py

README.md

#Introduction

Weatherpy is a package that allows you to simply and easily access Yahoo's weather API. Give weatherpy a user agent and a WOEID and weatherpy will make accessing elements of the RSS feed simple. WOEID (Where On Earth Identifiers) can be found here.

lets have a look at some of the things you can do.

import weatherpy
r = weatherpy.Response('My test user agent, 444544, metric=False)
print '{0}, {1} \n'.format(r.location.city, r.locaton.country) 
print '\tWind: {0}{1}'.format(r.wind.speed, r.units.speed)
print '\tSunrise: {0}'.format(r.astronomy.sunrise)
print '\tSunset: {0}'.format(r.astronomy.sunset)
print '\tConditions: {0}'.format(r.conditions.text)

Gives something like.

Belast, UK

    Wind: 7mph
    Sunrise: 6:30 am
    Sunset: 11:40 pm
    Conditions: Partly Cloudy

#Installation

pip install weatherpy

#Examples and Documentation

For a number of code example and documentation please visit weatherpy's github wiki.

#Licence

Weatherpy is licenced under the MIT licence. For the full licence look at the LICENCE.txt file.