Skip to main content

Deutscher Bundestag - DIP

Project description

dip-bundestag

API des Dokumentations- und Informationssystems für Parlamentsmaterialien

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

  • API version: 1.2
  • Package version: 0.1.1
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[dip_bundestag]

poetry install

poetry add deutschland -E dip_bundestag

Setuptools

Install via Setuptools.

python setup.py install --user

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

Usage

Import the package:

from deutschland import dip_bundestag

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import dip_bundestag
from pprint import pprint
from deutschland.dip_bundestag.api import aktivitten_api
from deutschland.dip_bundestag.model.aktivitaet import Aktivitaet
from deutschland.dip_bundestag.model.aktivitaet_list_response import AktivitaetListResponse
from deutschland.dip_bundestag.model.get_vorgang404_response import GetVorgang404Response
from deutschland.dip_bundestag.model.get_vorgang_list400_response import GetVorgangList400Response
from deutschland.dip_bundestag.model.get_vorgang_list401_response import GetVorgangList401Response
from deutschland.dip_bundestag.model.zuordnung import Zuordnung
# Defining the host is optional and defaults to https://search.dip.bundestag.de/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = dip_bundestag.Configuration(
    host = "https://search.dip.bundestag.de/api/v1"
)

# 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 API key authorization: ApiKeyHeader
configuration.api_key['ApiKeyHeader'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyHeader'] = 'Bearer'

# Configure API key authorization: ApiKeyQuery
configuration.api_key['ApiKeyQuery'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyQuery'] = 'Bearer'


# Enter a context with an instance of the API client
with dip_bundestag.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = aktivitten_api.AktivittenApi(api_client)
    id = 1 # int | 
    format = "json" # str | Steuert das Datenformat der Antwort, möglich sind JSON (voreingestellt) oder XML. (optional) (default to "json")

    try:
        # Liefert Metadaten zu einer Aktivität
        api_response = api_instance.get_aktivitaet(id, format=format)
        pprint(api_response)
    except dip_bundestag.ApiException as e:
        print("Exception when calling AktivittenApi->get_aktivitaet: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://search.dip.bundestag.de/api/v1

Class Method HTTP request Description
AktivittenApi get_aktivitaet GET /aktivitaet/{id} Liefert Metadaten zu einer Aktivität
AktivittenApi get_aktivitaet_list GET /aktivitaet Liefert eine Liste von Metadaten zu Aktivitäten
DrucksachenApi get_drucksache GET /drucksache/{id} Liefert Metadaten zu einer Drucksache
DrucksachenApi get_drucksache_list GET /drucksache Liefert eine Liste von Metadaten zu Drucksachen
DrucksachenApi get_drucksache_text GET /drucksache-text/{id} Liefert Volltext und Metadaten zu einer Drucksache
DrucksachenApi get_drucksache_text_list GET /drucksache-text Liefert eine Liste von Volltexten und Metadaten zu Drucksachen
PersonenstammdatenApi get_person GET /person/{id} Liefert Personenstammdaten zu einer Person
PersonenstammdatenApi get_person_list GET /person Liefert eine Liste von Personenstammdaten
PlenarprotokolleApi get_plenarprotokoll GET /plenarprotokoll/{id} Liefert Metadaten zu einem Plenarprotokoll
PlenarprotokolleApi get_plenarprotokoll_list GET /plenarprotokoll Liefert eine Liste von Metadaten zu Plenarprotokollen
PlenarprotokolleApi get_plenarprotokoll_text GET /plenarprotokoll-text/{id} Liefert Volltext und Metadaten zu einem Plenarprotokoll
PlenarprotokolleApi get_plenarprotokoll_text_list GET /plenarprotokoll-text Liefert eine Liste von Volltexten und Metadaten zu Plenarprotokollen
VorgangspositionenApi get_vorgangsposition GET /vorgangsposition/{id} Liefert Metadaten zu einer Vorgangsposition
VorgangspositionenApi get_vorgangsposition_list GET /vorgangsposition Liefert eine Liste von Metadaten zu Vorgangspositionen
VorgngeApi get_vorgang GET /vorgang/{id} Liefert Metadaten zu einem Vorgang
VorgngeApi get_vorgang_list GET /vorgang Liefert eine Liste von Metadaten zu Vorgängen

Documentation For Models

Documentation For Authorization

ApiKeyHeader

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

ApiKeyQuery

  • Type: API key
  • API key parameter name: apikey
  • Location: URL query string

Author

parlamentsdokumentation@bundestag.de

Notes for Large OpenAPI documents

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

de_dip_bundestag-0.1.1.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

de_dip_bundestag-0.1.1-py3-none-any.whl (205.0 kB view details)

Uploaded Python 3

File details

Details for the file de_dip_bundestag-0.1.1.tar.gz.

File metadata

  • Download URL: de_dip_bundestag-0.1.1.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for de_dip_bundestag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7abf4205f92d599294ab3828861ec20f224ccf8b546573e7eaa0e9acb771c078
MD5 b54c712e962a75b57be93856afdf0723
BLAKE2b-256 eb68ab4243ca1a5c162f703240bc6c1aa6ee6d2762c7aa45a6e913c0e59c1c9a

See more details on using hashes here.

File details

Details for the file de_dip_bundestag-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for de_dip_bundestag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78b4783d63cdb403fc7d5a2d9e321eedf69aa8dcc24709d355dd72e18c8860ff
MD5 5aef5c2ac6f9a20e6be5d7b95d2d9fbc
BLAKE2b-256 859fbcc1c154c252bc32003cf25c9c954fe3f68b08a4e2d2b197ddcf9272824d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page