dwdwfsapi


Namedwdwfsapi JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummaryPython client to retrieve data provided by DWD via their geoserver WFS API
upload_time2024-03-18 16:45:41
maintainer
docs_urlNone
author
requires_python>=3.11
license
keywords deutscher wetterdienst dwd ows wfs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dwdwfsapi
Python client to retrieve data provided by DWD via their geoserver WFS API

The DWD (Deutscher Wetterdienst) publishes various weather information for Germany.
The data is published via their [Geoserver](https://maps.dwd.de). For a more information have a look [here](https://www.dwd.de/DE/leistungen/geodienste/geodienste.html) and [here](https://maps.dwd.de/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetCapabilities).

## Install
```
pip install dwdwfsapi
```

## Usage
The WFS API currently consists of three modules. One for retrieving the current weather warnings, one for retrieving the bio weather forecast and one for retrieving the pollen flight forecast.

### Weather warnings module

#### Quickstart example
Python code
```
from dwdwfsapi import DwdWeatherWarningsAPI
dwd = DwdWeatherWarningsAPI('813073088')

if dwd.data_valid:
    print(f"Warncell id: {dwd.warncell_id}")
    print(f"Warncell name: {dwd.warncell_name}")
    print(f"Number of current warnings: {len(dwd.current_warnings)}")
    print(f"Current warning level: {dwd.current_warning_level}")
    print(f"Number of expected warnings: {len(dwd.expected_warnings)}")
    print(f"Expected warning level: {dwd.expected_warning_level}")
    print(f"Last update: {dwd.last_update}")
    print('-----------')
    for warning in dwd.current_warnings:
        print(warning)
        print('-----------')
    for warning in dwd.expected_warnings:
        print(warning)
        print('-----------')
```

Result (formatted for better readability)
```
Warncell id: 813073088
Warncell name: Stadt Stralsund
Number of current warnings: 0
Current warning level: 0
Number of expected warnings: 1
Expected warning level: 1
Last update: 2020-04-18 17:57:29.274000+00:00
-----------
{
    'start_time': datetime.datetime(2020, 4, 18, 23, 0, tzinfo=datetime.timezone.utc),
    'end_time': datetime.datetime(2020, 4, 19, 5, 0, tzinfo=datetime.timezone.utc),
    'event': 'FROST',
    'event_code': 22,
    'headline': 'Amtliche WARNUNG vor FROST',
    'description': 'Es tritt leichter Frost um 0 °C auf. In Bodennähe wird leichter Frost bis -4 °C erwartet.',
    'instruction': None, 'level': 1,
    'parameters':
    {
        'Lufttemperatur': '~0 [°C]',
        'Bodentemperatur': '>-4 [°C]'
    },
    'color': '#ffff00'
}
-----------
```

#### Detailed description
**Methods:**
- **`__init__(identifier)`**  
  Create a new weather warnings API class instance  
  
  The `identifier` can either be a so called `warncell id` (int), a `warncell name` (str) or a `gps location` (tuple). 
  It is heavily advised to use `warncell id` over `warncell name` because the name is not unique in some cases. The 
  `gps location` consists of the latitude and longitude in this order. Keeping this order for the tuple is important for
  the query to work correctly.  

  A list of valid warncell ids and names can be found in [warncells.md](https://github.com/stephan192/dwdwfsapi/blob/master/docs/warncells.md).  

  Method `update()` is automatically called at the end of a successfull init.  

- **`update()`**  
  Update data by querying DWD server and parsing result  
  
  Function should be called regularly, e.g. every 15minutes, to update the data stored in the class attributes.

**Attributes (read only):**
- **`data_valid : bool`**  
  A flag wether or not the other attributes contain valid values

- **`warncell_id : int`**  
  The id of the selected warncell

- **`warncell_name : str`**  
  The name of the selected warncell  
  
  If the name is not unique `" (not unique use ID!)"` will be added to the name

- **`last_update : datetime`**  
  Timestamp of the last update

- **`current_warning_level : int`**  
  Highest currently active warning level  
  
  Range: 0 (=no warning) to 4 (=extreme weather)

- **`current_warnings : list of dicts`**  
  Dictionary containing all currently active warnings ("Wetterwarnungen", urgency="immediate")
  
  See section warning dictionary for more details

- **`expected_warning_level : int`**  
  Highest expected warning level  
  
  Range: 0 (=no warning) to 4 (=extreme weather)

- **`expected_warnings : list of dicts`**  
  Dictionary containing all expected warnings ("Vorabinformationen", urgency="future")
  
  See section warning dictionary for more details

**Warning dictionary**
- **`start_time : datetime`**  
  Timestamp when the warning starts

- **`end_time : datetime`**  
  Timestamp when the warning ends

- **`event: str`**  
  String representation of the warning event

- **`event_code: int`**  
  Integer representation of the warning event

- **`headline : str`**  
  The official warning headline

- **`description : str`**  
  A details warning description

- **`instruction : str`**  
  Instructions and safety notices

- **`urgency : str`**  
  Warning urgency (either "immediate" or "future")

- **`level : int`**  
  Warning level  
  
  Range: 0 (=no warning) to 4 (=extreme weather)

- **`parameters : dict`**  
  Dictionary containing warning specific parameters  

- **`color : str`**  
  Warning color formatted #rrggbb

### Bio weather module

#### Quickstart example
Python code
```
from dwdwfsapi import DwdBioWeatherAPI
dwd = DwdBioWeatherAPI(8)

if dwd.data_valid:
    for k, v in dwd.forecast_data.items():
        print(f"{k} - {v['name']}")
        for entry in v["forecast"]:
            print(f"\t{entry['start_time']} : {entry['color']} - {entry['level']} = {entry['impact']}")
```

Result
```
1 - allgemeine Befindensbeeinträchtigungen
        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-16 12:00:00+00:00 : #006eff - 0 = positiver Einfluss
        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 12:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
2 - Asthma
        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-16 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
3 - Herz- und Kreislaufgeschehen (hypotone Form)
        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-16 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 12:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
4 - Herz- und Kreislaufgeschehen (hypertone Form)
        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-16 12:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
5 - rheumatische Beschwerden (degenerativ)
        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-16 12:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
6 - rheumatische Beschwerden (entzündlich)
        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-16 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss
        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
        2024-03-17 12:00:00+00:00 : #ffff00 - 2 = geringe Gefährdung
```

#### Detailed description
**Methods:**
- **`__init__(identifier)`**  
  Create a new bio weather API class instance  
  
  The `identifier` can either be a so called `cell id` (int) or a `cell name` (str). 
  It is heavily advised to use `cell id` over `cell name` because the name is not unique in some cases.

  A list of valid cell ids and names can be found in [biocells.md](https://github.com/stephan192/dwdwfsapi/blob/master/docs/biocells.md).  

  Method `update()` is automatically called at the end of a successfull init.  

- **`update()`**  
  Update data by querying DWD server and parsing result  
  
  Function should be called regularly, e.g. every 12hours, to update the data stored in the class attributes.

**Attributes (read only):**
- **`data_valid : bool`**  
  A flag wether or not the other attributes contain valid values

- **`cell_id : int`**  
  The id of the selected cell

- **`cell_name : str`**  
  The name of the selected ncell  
  
  If the name is not unique `" (not unique use ID!)"` will be added to the name

- **`last_update : datetime`**  
  Timestamp of the last update

- **`forecast_data : dict`**  
  Dictionary containing all forecast data
  
  See section forecast data dictionary for more details

**Forecast data dictionary**
- **`key : int`**  
  Data type

- **`name : str`**  
  String representation of the data type

- **`forecast : list of dicts`**  
  List containing the forecast data
  
  See section forecast dictionary for more details

**Forecast dictionary**
- **`start_time : datetime`**  
  Timestamp when the forecast starts

- **`level : int`**  
  Impact level (0 - 3)

- **`impact : str`**  
  String representation of the impact level

- **`color : str`**  
  Forecast color formatted #rrggbb

### Pollen flight module

#### Quickstart example
Python code
```
from dwdwfsapi import DwdPollenFlightAPI
dwd = DwdPollenFlightAPI(41)

if dwd.data_valid:
    for k, v in dwd.forecast_data.items():
        print(f"{k} - {v['name']}")
        for entry in v["forecast"]:
            print(f"\t{entry['start_time']} : {entry['color']} - {entry['level']} = {entry['impact']}")
```

Result
```
1 - Hasel
        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine
2 - Erle
        2024-03-15 00:00:00+00:00 : #fee391 - 2 = gering
        2024-03-16 00:00:00+00:00 : #fee391 - 3 = gering bis mittel
        2024-03-17 00:00:00+00:00 : #fee391 - 3 = gering bis mittel
8 - Esche
        2024-03-15 00:00:00+00:00 : #fee391 - 2 = gering
        2024-03-16 00:00:00+00:00 : #fee391 - 2 = gering
        2024-03-17 00:00:00+00:00 : #fee391 - 3 = gering bis mittel
3 - Birke
        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-17 00:00:00+00:00 : #ffffff - 2 = gering
4 - Gräser
        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine
5 - Roggen
        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine
6 - Beifuß
        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine
7 - Ambrosia
        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine
        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine
```

#### Detailed description
**Methods:**
- **`__init__(identifier)`**  
  Create a new pollen flight API class instance  
  
  The `identifier` can either be a so called `cell id` (int) or a `cell name` (str). 
  It is heavily advised to use `cell id` over `cell name` because the name is not unique in some cases.

  A list of valid cell ids and names can be found in [pollencells.md](https://github.com/stephan192/dwdwfsapi/blob/master/docs/pollencells.md).  

  Method `update()` is automatically called at the end of a successfull init.  

- **`update()`**  
  Update data by querying DWD server and parsing result  
  
  Function should be called regularly, e.g. every 12hours, to update the data stored in the class attributes.

**Attributes (read only):**
- **`data_valid : bool`**  
  A flag wether or not the other attributes contain valid values

- **`cell_id : int`**  
  The id of the selected cell

- **`cell_name : str`**  
  The name of the selected ncell  
  
  If the name is not unique `" (not unique use ID!)"` will be added to the name

- **`last_update : datetime`**  
  Timestamp of the last update

- **`forecast_data : dict`**  
  Dictionary containing all forecast data
  
  See section forecast data dictionary for more details

**Forecast data dictionary**
- **`key : int`**  
  Data type

- **`name : str`**  
  String representation of the data type

- **`forecast : list of dicts`**  
  List containing the forecast data
  
  See section forecast dictionary for more details

**Forecast dictionary**
- **`start_time : datetime`**  
  Timestamp when the forecast starts

- **`level : int`**  
  Impact level (0 - 6)

- **`impact : str`**  
  String representation of the impact level

- **`color : str`**  
  Forecast color formatted #rrggbb

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dwdwfsapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "deutscher wetterdienst,dwd,ows,wfs",
    "author": "",
    "author_email": "stephan192 <stephan192@outlook.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/c6/cd7d986e52a20acead4fbd2a08e09349481a694fee24c7766aec36190dc8/dwdwfsapi-1.1.0.tar.gz",
    "platform": null,
    "description": "# dwdwfsapi\nPython client to retrieve data provided by DWD via their geoserver WFS API\n\nThe DWD (Deutscher Wetterdienst) publishes various weather information for Germany.\nThe data is published via their [Geoserver](https://maps.dwd.de). For a more information have a look [here](https://www.dwd.de/DE/leistungen/geodienste/geodienste.html) and [here](https://maps.dwd.de/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetCapabilities).\n\n## Install\n```\npip install dwdwfsapi\n```\n\n## Usage\nThe WFS API currently consists of three modules. One for retrieving the current weather warnings, one for retrieving the bio weather forecast and one for retrieving the pollen flight forecast.\n\n### Weather warnings module\n\n#### Quickstart example\nPython code\n```\nfrom dwdwfsapi import DwdWeatherWarningsAPI\ndwd = DwdWeatherWarningsAPI('813073088')\n\nif dwd.data_valid:\n    print(f\"Warncell id: {dwd.warncell_id}\")\n    print(f\"Warncell name: {dwd.warncell_name}\")\n    print(f\"Number of current warnings: {len(dwd.current_warnings)}\")\n    print(f\"Current warning level: {dwd.current_warning_level}\")\n    print(f\"Number of expected warnings: {len(dwd.expected_warnings)}\")\n    print(f\"Expected warning level: {dwd.expected_warning_level}\")\n    print(f\"Last update: {dwd.last_update}\")\n    print('-----------')\n    for warning in dwd.current_warnings:\n        print(warning)\n        print('-----------')\n    for warning in dwd.expected_warnings:\n        print(warning)\n        print('-----------')\n```\n\nResult (formatted for better readability)\n```\nWarncell id: 813073088\nWarncell name: Stadt Stralsund\nNumber of current warnings: 0\nCurrent warning level: 0\nNumber of expected warnings: 1\nExpected warning level: 1\nLast update: 2020-04-18 17:57:29.274000+00:00\n-----------\n{\n    'start_time': datetime.datetime(2020, 4, 18, 23, 0, tzinfo=datetime.timezone.utc),\n    'end_time': datetime.datetime(2020, 4, 19, 5, 0, tzinfo=datetime.timezone.utc),\n    'event': 'FROST',\n    'event_code': 22,\n    'headline': 'Amtliche WARNUNG vor FROST',\n    'description': 'Es tritt leichter Frost um 0 \u00b0C auf. In Bodenn\u00e4he wird leichter Frost bis -4 \u00b0C erwartet.',\n    'instruction': None, 'level': 1,\n    'parameters':\n    {\n        'Lufttemperatur': '~0 [\u00b0C]',\n        'Bodentemperatur': '>-4 [\u00b0C]'\n    },\n    'color': '#ffff00'\n}\n-----------\n```\n\n#### Detailed description\n**Methods:**\n- **`__init__(identifier)`**  \n  Create a new weather warnings API class instance  \n  \n  The `identifier` can either be a so called `warncell id` (int), a `warncell name` (str) or a `gps location` (tuple). \n  It is heavily advised to use `warncell id` over `warncell name` because the name is not unique in some cases. The \n  `gps location` consists of the latitude and longitude in this order. Keeping this order for the tuple is important for\n  the query to work correctly.  \n\n  A list of valid warncell ids and names can be found in [warncells.md](https://github.com/stephan192/dwdwfsapi/blob/master/docs/warncells.md).  \n\n  Method `update()` is automatically called at the end of a successfull init.  \n\n- **`update()`**  \n  Update data by querying DWD server and parsing result  \n  \n  Function should be called regularly, e.g. every 15minutes, to update the data stored in the class attributes.\n\n**Attributes (read only):**\n- **`data_valid : bool`**  \n  A flag wether or not the other attributes contain valid values\n\n- **`warncell_id : int`**  \n  The id of the selected warncell\n\n- **`warncell_name : str`**  \n  The name of the selected warncell  \n  \n  If the name is not unique `\" (not unique use ID!)\"` will be added to the name\n\n- **`last_update : datetime`**  \n  Timestamp of the last update\n\n- **`current_warning_level : int`**  \n  Highest currently active warning level  \n  \n  Range: 0 (=no warning) to 4 (=extreme weather)\n\n- **`current_warnings : list of dicts`**  \n  Dictionary containing all currently active warnings (\"Wetterwarnungen\", urgency=\"immediate\")\n  \n  See section warning dictionary for more details\n\n- **`expected_warning_level : int`**  \n  Highest expected warning level  \n  \n  Range: 0 (=no warning) to 4 (=extreme weather)\n\n- **`expected_warnings : list of dicts`**  \n  Dictionary containing all expected warnings (\"Vorabinformationen\", urgency=\"future\")\n  \n  See section warning dictionary for more details\n\n**Warning dictionary**\n- **`start_time : datetime`**  \n  Timestamp when the warning starts\n\n- **`end_time : datetime`**  \n  Timestamp when the warning ends\n\n- **`event: str`**  \n  String representation of the warning event\n\n- **`event_code: int`**  \n  Integer representation of the warning event\n\n- **`headline : str`**  \n  The official warning headline\n\n- **`description : str`**  \n  A details warning description\n\n- **`instruction : str`**  \n  Instructions and safety notices\n\n- **`urgency : str`**  \n  Warning urgency (either \"immediate\" or \"future\")\n\n- **`level : int`**  \n  Warning level  \n  \n  Range: 0 (=no warning) to 4 (=extreme weather)\n\n- **`parameters : dict`**  \n  Dictionary containing warning specific parameters  \n\n- **`color : str`**  \n  Warning color formatted #rrggbb\n\n### Bio weather module\n\n#### Quickstart example\nPython code\n```\nfrom dwdwfsapi import DwdBioWeatherAPI\ndwd = DwdBioWeatherAPI(8)\n\nif dwd.data_valid:\n    for k, v in dwd.forecast_data.items():\n        print(f\"{k} - {v['name']}\")\n        for entry in v[\"forecast\"]:\n            print(f\"\\t{entry['start_time']} : {entry['color']} - {entry['level']} = {entry['impact']}\")\n```\n\nResult\n```\n1 - allgemeine Befindensbeeintr\u00e4chtigungen\n        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-16 12:00:00+00:00 : #006eff - 0 = positiver Einfluss\n        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 12:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n2 - Asthma\n        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-16 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n3 - Herz- und Kreislaufgeschehen (hypotone Form)\n        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-16 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 12:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n4 - Herz- und Kreislaufgeschehen (hypertone Form)\n        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-16 12:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n5 - rheumatische Beschwerden (degenerativ)\n        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-16 12:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n6 - rheumatische Beschwerden (entz\u00fcndlich)\n        2024-03-15 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-15 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-16 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-16 12:00:00+00:00 : #37ba29 - 1 = kein Einfluss\n        2024-03-17 00:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n        2024-03-17 12:00:00+00:00 : #ffff00 - 2 = geringe Gef\u00e4hrdung\n```\n\n#### Detailed description\n**Methods:**\n- **`__init__(identifier)`**  \n  Create a new bio weather API class instance  \n  \n  The `identifier` can either be a so called `cell id` (int) or a `cell name` (str). \n  It is heavily advised to use `cell id` over `cell name` because the name is not unique in some cases.\n\n  A list of valid cell ids and names can be found in [biocells.md](https://github.com/stephan192/dwdwfsapi/blob/master/docs/biocells.md).  \n\n  Method `update()` is automatically called at the end of a successfull init.  \n\n- **`update()`**  \n  Update data by querying DWD server and parsing result  \n  \n  Function should be called regularly, e.g. every 12hours, to update the data stored in the class attributes.\n\n**Attributes (read only):**\n- **`data_valid : bool`**  \n  A flag wether or not the other attributes contain valid values\n\n- **`cell_id : int`**  \n  The id of the selected cell\n\n- **`cell_name : str`**  \n  The name of the selected ncell  \n  \n  If the name is not unique `\" (not unique use ID!)\"` will be added to the name\n\n- **`last_update : datetime`**  \n  Timestamp of the last update\n\n- **`forecast_data : dict`**  \n  Dictionary containing all forecast data\n  \n  See section forecast data dictionary for more details\n\n**Forecast data dictionary**\n- **`key : int`**  \n  Data type\n\n- **`name : str`**  \n  String representation of the data type\n\n- **`forecast : list of dicts`**  \n  List containing the forecast data\n  \n  See section forecast dictionary for more details\n\n**Forecast dictionary**\n- **`start_time : datetime`**  \n  Timestamp when the forecast starts\n\n- **`level : int`**  \n  Impact level (0 - 3)\n\n- **`impact : str`**  \n  String representation of the impact level\n\n- **`color : str`**  \n  Forecast color formatted #rrggbb\n\n### Pollen flight module\n\n#### Quickstart example\nPython code\n```\nfrom dwdwfsapi import DwdPollenFlightAPI\ndwd = DwdPollenFlightAPI(41)\n\nif dwd.data_valid:\n    for k, v in dwd.forecast_data.items():\n        print(f\"{k} - {v['name']}\")\n        for entry in v[\"forecast\"]:\n            print(f\"\\t{entry['start_time']} : {entry['color']} - {entry['level']} = {entry['impact']}\")\n```\n\nResult\n```\n1 - Hasel\n        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine\n2 - Erle\n        2024-03-15 00:00:00+00:00 : #fee391 - 2 = gering\n        2024-03-16 00:00:00+00:00 : #fee391 - 3 = gering bis mittel\n        2024-03-17 00:00:00+00:00 : #fee391 - 3 = gering bis mittel\n8 - Esche\n        2024-03-15 00:00:00+00:00 : #fee391 - 2 = gering\n        2024-03-16 00:00:00+00:00 : #fee391 - 2 = gering\n        2024-03-17 00:00:00+00:00 : #fee391 - 3 = gering bis mittel\n3 - Birke\n        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-17 00:00:00+00:00 : #ffffff - 2 = gering\n4 - Gr\u00e4ser\n        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine\n5 - Roggen\n        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine\n6 - Beifu\u00df\n        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine\n7 - Ambrosia\n        2024-03-15 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-16 00:00:00+00:00 : #ffffff - 0 = keine\n        2024-03-17 00:00:00+00:00 : #ffffff - 0 = keine\n```\n\n#### Detailed description\n**Methods:**\n- **`__init__(identifier)`**  \n  Create a new pollen flight API class instance  \n  \n  The `identifier` can either be a so called `cell id` (int) or a `cell name` (str). \n  It is heavily advised to use `cell id` over `cell name` because the name is not unique in some cases.\n\n  A list of valid cell ids and names can be found in [pollencells.md](https://github.com/stephan192/dwdwfsapi/blob/master/docs/pollencells.md).  \n\n  Method `update()` is automatically called at the end of a successfull init.  \n\n- **`update()`**  \n  Update data by querying DWD server and parsing result  \n  \n  Function should be called regularly, e.g. every 12hours, to update the data stored in the class attributes.\n\n**Attributes (read only):**\n- **`data_valid : bool`**  \n  A flag wether or not the other attributes contain valid values\n\n- **`cell_id : int`**  \n  The id of the selected cell\n\n- **`cell_name : str`**  \n  The name of the selected ncell  \n  \n  If the name is not unique `\" (not unique use ID!)\"` will be added to the name\n\n- **`last_update : datetime`**  \n  Timestamp of the last update\n\n- **`forecast_data : dict`**  \n  Dictionary containing all forecast data\n  \n  See section forecast data dictionary for more details\n\n**Forecast data dictionary**\n- **`key : int`**  \n  Data type\n\n- **`name : str`**  \n  String representation of the data type\n\n- **`forecast : list of dicts`**  \n  List containing the forecast data\n  \n  See section forecast dictionary for more details\n\n**Forecast dictionary**\n- **`start_time : datetime`**  \n  Timestamp when the forecast starts\n\n- **`level : int`**  \n  Impact level (0 - 6)\n\n- **`impact : str`**  \n  String representation of the impact level\n\n- **`color : str`**  \n  Forecast color formatted #rrggbb\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python client to retrieve data provided by DWD via their geoserver WFS API",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/stephan192/dwdwfsapi",
        "Issues": "https://github.com/stephan192/dwdwfsapi/issues"
    },
    "split_keywords": [
        "deutscher wetterdienst",
        "dwd",
        "ows",
        "wfs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6cab5807494070fe10c107719565f84bbb26032fcf5fd8ddb43a8d2c616bfdbb",
                "md5": "a87fde26f615bd3a0639ba8d80367a54",
                "sha256": "587891f45200a0bda8692371500a13cd766b199c2c80ce2f1c98e954d687797e"
            },
            "downloads": -1,
            "filename": "dwdwfsapi-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a87fde26f615bd3a0639ba8d80367a54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 12853,
            "upload_time": "2024-03-18T16:45:40",
            "upload_time_iso_8601": "2024-03-18T16:45:40.112608Z",
            "url": "https://files.pythonhosted.org/packages/6c/ab/5807494070fe10c107719565f84bbb26032fcf5fd8ddb43a8d2c616bfdbb/dwdwfsapi-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07c6cd7d986e52a20acead4fbd2a08e09349481a694fee24c7766aec36190dc8",
                "md5": "f851b96401c0e7d4958fa276d7431122",
                "sha256": "edd2150fee0c898b6c8c03398faecc95b8943764390e92ba6d453466e1cddab9"
            },
            "downloads": -1,
            "filename": "dwdwfsapi-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f851b96401c0e7d4958fa276d7431122",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 9608,
            "upload_time": "2024-03-18T16:45:41",
            "upload_time_iso_8601": "2024-03-18T16:45:41.428680Z",
            "url": "https://files.pythonhosted.org/packages/07/c6/cd7d986e52a20acead4fbd2a08e09349481a694fee24c7766aec36190dc8/dwdwfsapi-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 16:45:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stephan192",
    "github_project": "dwdwfsapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dwdwfsapi"
}
        
Elapsed time: 0.18858s