Parsers for DWD's open weather data.
Project description
dwdparse
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
-
Install the
dwdparse
package from PyPI:$ pip install dwdparse
-
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
-
Install the
dwdparse
package from PyPI:$ pip install dwdparse
-
In Python, import one of the
dwdparse
parsers (or theget_parser
utility function) fromdwdparse
, then call it'sparse()
method with the path of the file you would like to parse. This will return an iterable over weather records:from brightsky 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.
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
File details
Details for the file dwdparse-0.9.3.tar.gz
.
File metadata
- Download URL: dwdparse-0.9.3.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e560e7331973a9e0e6d5fee9f6851be366d9ad1312ff42c2f6de45efe0505d75 |
|
MD5 | b09a5ae218e75b2cf42e975406f75585 |
|
BLAKE2b-256 | e1fbc4965f9c8a60f14722b879dd2efe0c1547e73710dd986a0f9f16c6f2a65f |
Provenance
File details
Details for the file dwdparse-0.9.3-py3-none-any.whl
.
File metadata
- Download URL: dwdparse-0.9.3-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 233a2a017db8aa14300ffc291238fc265e16707be66c4d1ef033796547552cc3 |
|
MD5 | 95b619d577a68e0238b2e115b9844453 |
|
BLAKE2b-256 | 1829431fbda76e07fb6051eef46e799e58ed3ecd692e67dd9cacbc8ad99a9d5a |