Skip to main content

Parsers for DWD's open weather data.

Project description

dwdparse

Build Status PyPI Release

Parsers for DWD's open weather data.

The DWD (Deutscher Wetterdienst), as Germany's meteorological service, publishes a myriad of meteorological observations and calculations as part of their Open Data program.

dwdparse is a Python library for parsing the various formats that this data is published in, with no dependencies outside the standard library. It serves as the parsing backend for Bright Sky.

Our development effort focuses mainly on the data that is made available through Bright Sky, although we are very open to requests or contributions regarding other parsing targets. If you are looking for a more complete set of parsers - including for data from other weather agencies - and you don't mind the extra dependencies, take a look at the excellent wetterdienst.

Looking for something specific?

I just want to retrieve some weather data

You can use the free public Bright Sky instance!

I want to parse DWD weather files or contribute to dwdparse's source code

Read on. :)

Quickstart

You can use this package both as a stand-alone command-line tool or as a Python library.

Stand-alone DWD file parsing

  1. Install the dwdparse package from PyPI:

    $ pip install dwdparse
    
  2. Call dwdparse, providing your target file (or URL) as argument:

    $ dwdparse stundenwerte_TU_01766_akt.zip
    

This will output a newline-separated list of JSON records. Note that all numerical weather data is converted to SI units. If you wish to use DWD units, or if you need both DWD and WMO station IDs, check out the --units option and the example section with dwdparse --help.

Parsing DWD files from Python code

  1. Install the dwdparse package from PyPI:

    $ pip install dwdparse
    
  2. In Python, import one of the dwdparse parsers (or the get_parser utility function) from dwdparse, then call it's parse() method with the path of the file you would like to parse. This will return an iterable over weather records:

    from dwdparse import get_parser
    
    
    DWD_FILE_PATH = 'stundenwerte_TU_01766_akt.zip'
    
    parser_class = get_parser(DWD_FILE_PATH)
    parser = parser_class()
    
    for record in parser.parse(DWD_FILE_PATH):
        print(record)
    

Acknowledgements

dwdparse is developed as the main parsing core for Bright Sky. Bright Sky's development is boosted by the priceless guidance and support of the Open Knowledge Foundation's Prototype Fund program, and is generously funded by Germany's Federal Ministry of Education and Research. Obvious as it may be, it should be mentioned that none of this would be possible without the painstaking, never-ending effort of the Deutscher Wetterdienst.

Prototype Fund     Open Knowledge Foundation Germany     Bundesministerium für Bildung und Forschung     Deutscher Wetterdienst

Project details


Download files

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

Source Distribution

dwdparse-0.9.22.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

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

dwdparse-0.9.22-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file dwdparse-0.9.22.tar.gz.

File metadata

  • Download URL: dwdparse-0.9.22.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dwdparse-0.9.22.tar.gz
Algorithm Hash digest
SHA256 b76bb5e5d1a5b4f192f8b278adfbd6b44c962fab4aea141836bb9b6d023682a1
MD5 7cb7774983e1c1e37b57d11fdcb994ba
BLAKE2b-256 5aff366e5c6e0c4e3fbb3a8bbf4468ef679134cd8e6a4056c2d33bdb2ab4c5c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwdparse-0.9.22.tar.gz:

Publisher: main.yml on jdemaeyer/dwdparse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dwdparse-0.9.22-py3-none-any.whl.

File metadata

  • Download URL: dwdparse-0.9.22-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dwdparse-0.9.22-py3-none-any.whl
Algorithm Hash digest
SHA256 9947b3f31ac99f59d9bf58c61ea16a92a6818bea7f8398810e53cf1ab1fab661
MD5 a899d5503a57e87343265a8cdf55e890
BLAKE2b-256 0bfb59f30e23e2654a5dc739fa1671639a810c502dea7ff9236c0d9de5d17b93

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwdparse-0.9.22-py3-none-any.whl:

Publisher: main.yml on jdemaeyer/dwdparse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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