Metadata-Version: 2.1
Name: de-pegel-online
Version: 0.1.1
Summary: Pegel-Online API
Home-page: https://github.com/bundesAPI/pegel-online-api
License: Apache-2.0
Keywords: OpenAPI,OpenAPI-Generator,pegel-online,App,API
Author: BundesAPI
Author-email: kontakt@bund.dev
Requires-Python: >=3.6
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: python-dateutil
Requires-Dist: urllib3 (>=1.25.3)
Project-URL: Bug Tracker, https://github.com/bundesAPI/pegel-online-api/issues
Description-Content-Type: text/markdown

# pegel-online
API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes.

Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__.
### Authentifizierung / Autorisierung / API Limitierung
Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung.
### Allgemeine Query-Parameter
Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)).
- `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_.
- `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen.
- `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. 

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 0.1.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.pegelonline.wsv.de/](https://www.pegelonline.wsv.de/)

## Requirements.

Python >= 3.6

## Installation & Usage
### pip install

```sh
pip install deutschland[pegel_online]
```

### poetry install

```sh
poetry add deutschland -E pegel_online
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

## Usage

Import the package:
```python
from deutschland import pegel_online
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
from deutschland import pegel_online
from pprint import pprint
from deutschland.pegel_online.api import measurement_api
from deutschland.pegel_online.model.measurement_result import MeasurementResult
from deutschland.pegel_online.model.timeseries_not_found import TimeseriesNotFound
# Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = pegel_online.Configuration(
    host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2"
)



# Enter a context with an instance of the API client
with pegel_online.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = measurement_api.MeasurementApi(api_client)
    station = "593647aa-9fea-43ec-a7d6-6476a76ae868" # str | UUID / Name / Pegelnummer der Station.
    timeseries = "W" # str | timeseries shortname
    start = "2022-02-06T09:00:00+01:00" # str | Zeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Angabe eines Datums oder einer Period (_P_, z.B. 'P8D' für die Messwerte der letzten 8 Tage) sind möglich. (optional)
    end = "" # str | Endzeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Kann auch leer gelassen werden, dann wird automatisch der aktuelle Zeitstempel verwendet. (optional)

    try:
        # Zugriff auf die Ressource Measurement
        api_response = api_instance.get_measurement_by_station(station, timeseries, start=start, end=end)
        pprint(api_response)
    except pegel_online.ApiException as e:
        print("Exception when calling MeasurementApi->get_measurement_by_station: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://www.pegelonline.wsv.de/webservices/rest-api/v2*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*MeasurementApi* | [**get_measurement_by_station**](docs/MeasurementApi.md#get_measurement_by_station) | **GET** /stations/{station}/{timeseries}/measurements.json | Zugriff auf die Ressource Measurement
*MeasurementApi* | [**get_measurement_diagram_by_station**](docs/MeasurementApi.md#get_measurement_diagram_by_station) | **GET** /stations/{station}/{timeseries}/measurements.png | Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG)
*StationApi* | [**get_stations**](docs/StationApi.md#get_stations) | **GET** /stations.json | Übersicht über alle Stationen (Pegel)
*StationApi* | [**get_stations_by_id**](docs/StationApi.md#get_stations_by_id) | **GET** /stations/{station}.json | Zugriff auf eine bestimmte Station (Pegel)
*WaterApi* | [**get_current_measurment_by_station**](docs/WaterApi.md#get_current_measurment_by_station) | **GET** /stations/{station}/{timeseries}.json | Zugriff auf eine Timeseries
*WaterApi* | [**get_waters**](docs/WaterApi.md#get_waters) | **GET** /waters.json | Zugriff auf die Ressource Water


## Documentation For Models

 - [Comment](docs/Comment.md)
 - [CommentInner](docs/CommentInner.md)
 - [CurrentMeasurement](docs/CurrentMeasurement.md)
 - [MeasurementResult](docs/MeasurementResult.md)
 - [MeasurementResultInner](docs/MeasurementResultInner.md)
 - [Station](docs/Station.md)
 - [StationOverviewResult](docs/StationOverviewResult.md)
 - [StationWater](docs/StationWater.md)
 - [Timeseries](docs/Timeseries.md)
 - [TimeseriesGaugeZero](docs/TimeseriesGaugeZero.md)
 - [TimeseriesNotFound](docs/TimeseriesNotFound.md)
 - [WaterResult](docs/WaterResult.md)


## Documentation For Authorization

 All endpoints do not require authorization.

## Author

kontakt@bund.dev


## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in pegel_online.apis and pegel_online.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from deutschland.pegel_online.api.default_api import DefaultApi`
- `from deutschland.pegel_online.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
from deutschland import pegel_online
from deutschland.pegel_online.apis import *
from deutschland.pegel_online.models import *
```


