WetterOnline API

wetteronline ist eine Python Bibliothek, die inoffiziellen Zugriff auf dieWetterdaten von wetteronline.de bietet.<https://www.wetteronline.de>`__. Sie verwendet Webscraping und bietet (hoffentlich) eine simple und intuitive API.

Bemerkung

Dieses Projekt ist unter aktiver Entwicklung. (Diese Dokumentation hier ebenfalls!) Wntscheide weise, ob du Code schreiben möchtest, der von dieser Bibliothek abhängig ist, denn Funktionen und Attribute kööten sich jederzeit ändern.

Inhalt

Installation

First things first, installing the package.

pip

You can install the WetterOnline API via pip in a terminal of your choice:

$ pip install wetteronline

source code

Alternatively the source code is available on Github here. You can clone the repository:

$ git clone https://github.com/johangroe/wetteronline-api.git

Quickstart

Ready to get started?

Basic usage

>> import wetteronline
>> l = wetteronline.location("New York")
>> l.url
"wetter/new-york-city"
>> w = wetteronline.weather("wetter/new-york-city")
>> w.temperature
18 # °C

Advanced usage

 >> import wetteronline
 >> l = wetteronline.location("New York")
 >> l.autosuggests
 ['New York', 'New York Mills, New York', 'New York, Missouri', 'New York Mills, Minnesota']
 >> w = wetteronline.weather(l.url)
 >> w.forecast_4d
 {'19.06.': {
     'maxTemperature': 24,
     'minTemperature': 13,
     'sunHours': 13,
     'precipitationProbability': 10
     },
 '20.06.': {
     'maxTemperature': 27,
     'minTemperature': 13,
     'sunHours': 13,
     'precipitationProbability': 5
     },
'21.06.': {
     'maxTemperature': 25,
     'minTemperature': 15,
     'sunHours': 3,
     'precipitationProbability': 80
     },
 '22.06.': {
     'maxTemperature': 27,
     'minTemperature': 18,
     'sunHours': 8,
     'precipitationProbability': 50
     }
 }

Usage