Skip to main content

Wetterdienst - Open weather data for humans

Warming stripes for Hohenpeißenberg, Germany: one stripe per year from 1781 to 2025, blue for cold years and red for warm ones
Hohenpeißenberg, Germany: 245 years of mean air temperature, one stripe per year from 1781 to 2025 — fetched and drawn with wetterdienst.

Global warming is not an opinion.

Erderwärmung ist keine Meinung.

CI status Documentation status Code coverage PyPI version Conda version Python version compatibility Project license PyPI downloads Citation reference

[!WARNING] This library is a work in progress! Breaking changes should be expected until a 1.0 release, so version pinning is recommended.

Wetterdienst gives you weather, climate and hydrology data from 22 national services through one interface: one way to find a station, one way to ask for values, one shape of result. It is a polars-based Python library, a command line client, a REST API, an MCP endpoint and a web app, all serving the same data.

Contributions and feedback are very welcome — we do not use most of this data ourselves, so what you need is what tells us what to build next. Hand in an issue or a PR.

What we support

Provider Country What you get
DWD 🇩🇪 Germany observations, MOSMIX/DMO forecasts, radar, warnings, road weather, derived indices
AEMET 🇪🇸 Spain observations (API key)
CHMI 🇨🇿 Czechia observations
DMI 🇩🇰 Denmark observations, incl. Greenland and the Faroe Islands (API key)
EA 🇬🇧 England hydrology
Eaufrance 🇫🇷 France hydrology
ECCC 🇨🇦 Canada observations
FMI 🇫🇮 Finland observations
GeoSphere 🇦🇹 Austria observations
IMGW 🇵🇱 Poland meteorology, hydrology
IPMA 🇵🇹 Portugal observations
KNMI 🇳🇱 Netherlands observations (API key)
LHMT 🇱🇹 Lithuania observations
Met Office 🇬🇧 UK MIDAS Open observations (CEDA account)
Météo-France 🇫🇷 France observations, SYNOP
MeteoSwiss 🇨🇭 Switzerland observations
met.no 🇳🇴 Norway Frost observations (API key)
NOAA 🌍 worldwide GHCN daily and hourly, stations across the globe
NWS 🇺🇸 USA observations
RMI 🇧🇪 Belgium observations
SMHI 🇸🇪 Sweden observations
WSV 🇩🇪 Germany hydrology (Pegelonline)

Across those: 514 canonical parameters, resolutions from 1 minute to annual, and archives reaching back centuries where the service keeps them. Every provider is reached the same way, and a parameter means the same thing whichever service reports it — temperature_air_mean_2m is the mean air temperature at 2 m, converted to the same unit, everywhere.

Licenses and usage requirements differ per provider, so check the data chapter before you publish anything built on them. It also lists every dataset and parameter per provider.

Features

  • Stations, values and station history (metadata changes) through one request model
  • Find stations by name, id, distance from a point, bounding box or rank
  • Request by parameters, periods, start_date, end_date; tune the rest through Settings
  • Unit conversion, interpolation and summarization for a point between stations
  • DWD weather alerts (CAP warnings) with GeoJSON geometry, by community or district
  • SQL queries over results, export to CSV/JSON/Excel/Parquet/Zarr and to SQLite, PostgreSQL, CrateDB, InfluxDB and DuckDB
  • Command line client, REST API and a public Docker image
  • MCP (Model Context Protocol) endpoint, so LLM agents can query the data as tools
  • Web app with map-based explorer, forecasts, climate stripes and a glossary, at wetterdienst.eobs.org

Setup

pip install wetterdienst           # from PyPI
pip install wetterdienst[export]   # with an extra
pip install git+https://github.com/earthobservations/wetterdienst  # most recent

Extras: bufr, cratedb, duckdb, eccodes, excel, export, influxdb, interpolation, knmi, mcp, mysql, pdf, plotting, postgresql, radar, radarplus, restapi, sql. Check the installation with wetterdienst --help.

Prefer Docker? The image ships with the optional dependencies included:

docker pull ghcr.io/earthobservations/wetterdienst
docker run -ti ghcr.io/earthobservations/wetterdienst wetterdienst --version

See the Docker chapter for running the REST API and the app from the image.

Example

Daily precipitation for Zinnwald-Georgenfeld, August 2002 — the flood:

from wetterdienst.provider.dwd.observation import DwdObservationRequest

request = DwdObservationRequest(
    parameters=[("daily", "climate_summary", "precipitation_height")],
    start_date="2002-08-11",
    end_date="2002-08-13",
).filter_by_station_id(station_id=(5779,))

stations = request.df
stations.head()
# ┌────────────┬─────────────────┬────────────┬─────────────────────────┬───┬───────────┬────────┬──────────────────────┬─────────┐
# │ resolution ┆ dataset         ┆ station_id ┆ start_date              ┆ … ┆ longitude ┆ height ┆ name                 ┆ state   │
# │ ---        ┆ ---             ┆ ---        ┆ ---                     ┆   ┆ ---       ┆ ---    ┆ ---                  ┆ ---     │
# │ str        ┆ str             ┆ str        ┆ datetime[μs, UTC]       ┆   ┆ f64       ┆ f64    ┆ str                  ┆ str     │
# ╞════════════╪═════════════════╪════════════╪═════════════════════════╪═══╪═══════════╪════════╪══════════════════════╪═════════╡
# │ daily      ┆ climate_summary ┆ 05779      ┆ 1971-01-01 00:00:00 UTC ┆ … ┆ 13.7516   ┆ 877.0  ┆ Zinnwald-Georgenfeld ┆ Sachsen │
# └────────────┴─────────────────┴────────────┴─────────────────────────┴───┴───────────┴────────┴──────────────────────┴─────────┘

values = request.values.all().df
values.head()
# ┌────────────┬────────────┬─────────────────┬──────────────────────┬─────────────────────────┬───────┬─────────┐
# │ station_id ┆ resolution ┆ dataset         ┆ parameter            ┆ date                    ┆ value ┆ quality │
# ╞════════════╪════════════╪═════════════════╪══════════════════════╪═════════════════════════╪═══════╪═════════╡
# │ 05779      ┆ daily      ┆ climate_summary ┆ precipitation_height ┆ 2002-08-11 00:00:00 UTC ┆ 67.9  ┆ 10.0    │
# │ 05779      ┆ daily      ┆ climate_summary ┆ precipitation_height ┆ 2002-08-12 00:00:00 UTC ┆ 312.0 ┆ 10.0    │
# │ 05779      ┆ daily      ┆ climate_summary ┆ precipitation_height ┆ 2002-08-13 00:00:00 UTC ┆ 26.3  ┆ 10.0    │
# └────────────┴────────────┴─────────────────┴──────────────────────┴─────────────────────────┴───────┴─────────┘

values.to_pandas()  # if you would rather have pandas

The same thing from the command line:

wetterdienst stations --provider=dwd --network=observation --parameters=daily/kl --all
wetterdienst values --provider=dwd --network=observation --parameters=daily/kl --station=1048,4411

More in examples and in the usage chapter.

Links

What we stand for

  • 🏳️‍🌈🏳️‍⚧️ We stand with the LGBTQI+ community.
  • ✊ No place for Nazis. FCKNZS.
  • 🌡️ Global warming is not an opinion.
  • 🔓 Weather data belongs to everyone.

Acknowledgements

We want to acknowledge all environmental agencies which provide their data open and free of charge first and foremost for the sake of endless research possibilities.

We want to acknowledge all contributors for being part of the improvements to this library that make it better and better every day.

Supported by

JetBrains logo     Anthropic logo

Special thanks to the kind people at JetBrains s.r.o. for a PyCharm licence through their open-source support programme, and to Anthropic for a Claude Max subscription for open-source maintainers.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wetterdienst-0.134.0.tar.gz (361.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wetterdienst-0.134.0-py3-none-any.whl (457.1 kB view details)

Uploaded Python 3

File details

Details for the file wetterdienst-0.134.0.tar.gz.

File metadata

  • Download URL: wetterdienst-0.134.0.tar.gz
  • Upload date:
  • Size: 361.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wetterdienst-0.134.0.tar.gz
Algorithm Hash digest
SHA256 c0122e14f6ad124ad3a63543c6a396baa74fd0d5583a62260d3d6e776e09b2cc
MD5 a362b29888f29f26503a9b39369b5645
BLAKE2b-256 c22e497b0834e80cdceac1c00b28a5846956a410f906eb94cf7697b751515154

See more details on using hashes here.

File details

Details for the file wetterdienst-0.134.0-py3-none-any.whl.

File metadata

  • Download URL: wetterdienst-0.134.0-py3-none-any.whl
  • Upload date:
  • Size: 457.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wetterdienst-0.134.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a35530d3af22c045c1f0298518c7bece1b17ac71b420577279689e5eaffca0e0
MD5 e997fca0bd2f6db665150f97aa9d54a1
BLAKE2b-256 48b27e712a36dc3af147da49ee100294eac86c828107f51e4c107787d608875f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.134.0 This release

2 files

0.133.0

2 files

0.132.0

2 files

0.131.0

2 files

0.130.0

2 files

0.129.0

2 files

0.128.0

2 files

0.127.0

2 files

0.126.0

2 files

0.125.0

2 files

0.124.0

2 files

0.123.0

2 files

0.122.0

2 files

0.121.1

2 files

0.121.0

2 files

0.120.0

2 files

0.119.0

2 files

0.118.0

2 files

0.117.0

2 files

0.116.0

2 files

0.115.0

2 files

0.114.3

2 files

0.114.2

2 files

0.114.1

2 files

0.114.0

2 files

0.113.0

2 files

0.112.0

2 files

0.111.0

2 files

0.110.0

2 files

0.109.0

2 files

0.108.0

2 files

0.107.0

2 files

0.106.0

2 files

0.105.0

2 files

0.104.0

2 files

0.103.0

2 files

0.102.0

2 files

0.101.0

2 files

0.100.0

2 files

0.99.0

2 files

0.98.0

2 files

0.97.0

2 files

0.96.0

2 files

0.95.1

2 files

0.95.0

2 files

0.94.0

2 files

0.93.0

2 files

0.92.0

2 files

0.91.0

2 files

0.90.0

2 files

0.89.0

2 files

0.88.0

2 files

0.87.0

2 files

0.86.0

2 files

0.85.0

2 files

0.84.0

2 files

0.83.0

2 files

0.82.0

2 files

0.81.0

2 files

0.80.0

2 files

0.79.0

2 files

0.78.0

2 files

0.77.1

2 files

0.77.0

2 files

0.76.1

2 files

0.76.0

2 files

0.75.0

2 files

0.74.0

2 files

0.73.0

2 files

0.72.0

2 files

0.71.0

2 files

0.70.0

2 files

0.69.0

2 files

0.68.0

2 files

0.67.0

2 files

0.66.1

2 files

0.66.0

2 files

0.65.0

2 files

0.64.0

2 files

0.63.0

2 files

0.62.0

2 files

0.61.0

2 files

0.60.0

2 files

0.59.3

2 files

0.59.2

2 files

0.59.1

2 files

0.59.0

2 files

0.58.1

2 files

0.58.0

2 files

0.57.1

2 files

0.57.0

2 files

0.56.2

2 files

0.56.1

2 files

0.56.0

2 files

0.55.1

2 files

0.55.0

2 files

0.54.1

2 files

0.54.0

2 files

0.53.0

2 files

0.52.0

2 files

0.51.0

2 files

0.50.0

2 files

0.49.0

2 files

0.48.0

2 files

0.47.1

2 files

0.47.0

2 files

0.46.0

2 files

0.45.2

2 files

0.45.1

2 files

0.45.0

2 files

0.44.0

2 files

0.43.0

2 files

0.42.1

2 files

0.42.0

2 files

0.41.1

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.0

2 files

0.35.0

2 files

0.34.0

2 files

0.33.0

2 files

0.32.4

2 files

0.32.3

2 files

0.32.2

2 files

0.32.1

2 files

0.32.0

2 files

0.31.1

2 files

0.31.0

2 files

0.30.1

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.1

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.21.0

2 files

0.20.4

2 files

0.20.3

2 files

0.20.2

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.1

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page