Skip to content

Latest commit

 

History

History
147 lines (106 loc) · 4.8 KB

README.md

File metadata and controls

147 lines (106 loc) · 4.8 KB

strahlenschutz

Daten zur radioaktiven Belastung in Deutschland

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/bundesAPI/deutschland.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/bundesAPI/deutschland.git)

Then import the package:

from deutschland import strahlenschutz

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

from deutschland import strahlenschutz

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import strahlenschutz
from pprint import pprint
from deutschland.strahlenschutz.api import default_api
from deutschland.strahlenschutz.model.inline_response200 import InlineResponse200
from deutschland.strahlenschutz.model.inline_response2001 import InlineResponse2001
from deutschland.strahlenschutz.model.inline_response2002 import InlineResponse2002
from deutschland.strahlenschutz.model.statistics import Statistics
# Defining the host is optional and defaults to https://odlinfo.bfs.de/json
# See configuration.py for a list of all supported configuration parameters.
configuration = strahlenschutz.Configuration(
    host = "https://odlinfo.bfs.de/json"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = strahlenschutz.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)


# Enter a context with an instance of the API client
with strahlenschutz.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    id = 97741851 # int | ID der Messstation

    try:
        # Stammdaten und Zeitreihen zu einer bestimmten Messstation.
        api_response = api_instance.id_json_get(id)
        pprint(api_response)
    except strahlenschutz.ApiException as e:
        print("Exception when calling DefaultApi->id_json_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://odlinfo.bfs.de/json

Class Method HTTP request Description
DefaultApi id_json_get GET /{id}.json Stammdaten und Zeitreihen zu einer bestimmten Messstation.
DefaultApi idct_json_get GET /{id}ct.json Stammdaten und Zeitreihen zu einer bestimmten Messstation inklusive kosmisch-terrestrischer Daten.
DefaultApi stamm_json_get GET /stamm.json Liste aller verfügbaren Messstationen.
DefaultApi stat_json_get GET /stat.json Statistiken zu den Messstationen.

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in strahlenschutz.apis and strahlenschutz.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.strahlenschutz.api.default_api import DefaultApi
  • from deutschland.strahlenschutz.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 strahlenschutz
from deutschland.strahlenschutz.apis import *
from deutschland.strahlenschutz.models import *