Skip to content

cmcdowell/weatherpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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.

About

A python wrapper for the Yahoo weather API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages