Python API wrapper for weather-api
Project description
Taranis
Taranis is a Python API wrapper for weather-api. It provides quick and easy retrieval of weather data for a given city.
Installation:
Install and update using pip:
pip install -U taranis
Usage:
Import the module:
>>> import taranis
Then call any of the below functions:
>>> taranis.get_weather('San Francisco')
{'temperature': '+15 °C', 'wind': '24 km/h', 'description': 'Partly cloudy', 'forecast': [{'day': '1', 'temperature': '20 °C', 'wind': '18 km/h'}, {'day': '2', 'temperature': '16 °C', 'wind': '22 km/h'}, {'day': '3', 'temperature': '17 °C', 'wind': '12 km/h'}]}
>>> taranis.get_temperature('San Francisco')
'+15 °C'
>>> taranis.get_wind('San Francisco')
'24 km/h'
>>> taranis.get_description('San Francisco')
'Partly cloudy'
>>> taranis.get_forecast('San Francisco')
[{'day': '1', 'temperature': '20 °C', 'wind': '18 km/h'}, {'day': '2', 'temperature': '16 °C', 'wind': '22 km/h'}, {'day': '3', 'temperature': '17 °C', 'wind': '12 km/h'}]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
taranis-0.2.0.tar.gz
(2.8 kB
view hashes)