A simple tool to retrieve weather forecast from DWD OpenData
Project description
Simple DWD weather forecast
DISCLAIMER: This project is a private open source project and doesn't have any connection with Deutscher Wetterdienst.
This is a python package for simple access to hourly forecast data for the next 10 days. The data is updated every six hours and updated when needed.
Available station-IDs can be found here in the third column.
Installation
python3 -m pip install simple_dwd_weatherforecast
Usage
from simple_dwd_weatherforecast import dwdforecast
from datetime import datetime, timedelta
dwd_weather = dwdforecast.Weather("10385") # Station-ID For BERLIN-SCHOENEFELD
time_now = datetime.now()
temperature_now = dwd_weather.get_forecast_temperature(time_now)
time_tomorrow = datetime.now()+timedelta(days=1)
temperature_tomorrow = dwd_weather.get_forecast_temperature(time_tomorrow)
Available methods
All methods return their values as string. If no data is available for this datetime, None will be returned.
get_forecast_temperature(datetime) #Result is in degrees Celcius
get_forecast_pressure(datetime) #Result is in hPa
get_forecast_wind_direction(datetime) #Result is in degrees magnetic
get_forecast_wind_speed(datetime) #Result is in m/s
get_forecast_precipitation(datetime) #Result is in kg/m2
get_forecast_precipitation_probability(datetime) #Result is in percent
get_forecast_cloud_coverage(datetime) #Result is in percent
get_forecast_visibility(datetime) #Result is in meters
get_forecast_sun_duration(datetime) #Result is in minutes of the last hour
get_daily_temp_max(datetime) #Result is in degrees Celcius
get_daily_temp_min(datetime) #Result is in degrees Celcius
Licenses
This package uses public data from DWD OpenData. The Copyright can be viewed here.
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
Built Distribution
Close
Hashes for simple_dwd_weatherforecast-0.9.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d69882e21442143732718ce8697dd750a2cee0b854403cd4bb7aeb7b63416f |
|
MD5 | 18783b66f3af8bfa6b637132a27ac0a6 |
|
BLAKE2b-256 | da166a7dde6c316db0cd0a2697675742f1cd5d65ddbcb0a6f8df7af4e7de9d9d |
Close
Hashes for simple_dwd_weatherforecast-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461f1362666cdae09c86123e316cbd64f32804d14efa115176d4105f1d097753 |
|
MD5 | 51033b0351fa9f522154ce3e10f2b2f2 |
|
BLAKE2b-256 | 1517c24f477aed562e4c8688a7313c332e8dcb2faecd0577405342ec61331b23 |