bundestag

October 9, 2021 · View on GitHub

Bundestag Informationen API

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

  • API version: 1.0.0
  • 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 bundestag

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 bundestag

Getting Started

Please follow the installation procedure and then run the following:


import time
from deutschland import bundestag
from pprint import pprint
from deutschland.bundestag.api import default_api
# Defining the host is optional and defaults to https://www.bundestag.de
# See configuration.py for a list of all supported configuration parameters.
configuration = bundestag.Configuration(
    host = "https://www.bundestag.de"
)



# Enter a context with an instance of the API client
with bundestag.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    article_id = 849630 # int | ID des Nachrichtenbeitrags

    try:
        # Artikel Details
        api_response = api_instance.blueprint_servlet_content_articleidas_app_v2_newsarticle_xml_get(article_id)
        pprint(api_response)
    except bundestag.ApiException as e:
        print("Exception when calling DefaultApi->blueprint_servlet_content_articleidas_app_v2_newsarticle_xml_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://www.bundestag.de

ClassMethodHTTP requestDescription
DefaultApiblueprint_servlet_content_articleidas_app_v2_newsarticle_xml_getGET /blueprint/servlet/content/{ARTICLE_ID}/asAppV2NewsarticleXmlArtikel Details
DefaultApiiptv_player_macros_xs144277506_bttv_mobile_feed_vod_xml_getGET /iptv/player/macros/_x_s-144277506/bttv/mobile/feed_vod.xmlAbruf eines Videos
DefaultApistatic_appdata_plenum_v2_conferences_xml_getGET /static/appdata/plenum/v2/conferences.xmlSitzungstag übersicht
DefaultApistatic_appdata_plenum_v2_speaker_xml_getGET /static/appdata/plenum/v2/speaker.xmlAktuelle Sprecher*in
DefaultApixml_v2_ausschuesse_ausschussid_xml_getGET /xml/v2/ausschuesse/{AUSSCHUSS_ID}.xmlÜbersicht über die Ausschüsse
DefaultApixml_v2_ausschuesse_index_xml_getGET /xml/v2/ausschuesse/index.xmlÜbersicht über die Ausschüsse
DefaultApixml_v2_mdb_biografien_mdbid_xml_getGET /xml/v2/mdb/biografien/{MDB_ID}.xmlAbruf Details eines MDBS
DefaultApixml_v2_mdb_index_xml_getGET /xml/v2/mdb/index.xmlÜbersicht über alle MDBS

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Notes for Large OpenAPI documents

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