Skip to main content

Bundeshaushalt API

Project description

bundeshaushalt

Mit unserem Tool „Bundeshaushalt digital“ können Sie sich eine visualisierte Darstellung der Haushaltsdaten der letzten Jahre anzeigen lassen. Sie können sowohl Ausgaben und Einnahmen als auch Soll- und Ist-Werte abrufen und mithilfe des Jahresvergleichs gegenüberstellen. Zudem steht Ihnen eine Vielzahl weiterer Filteroptionen zur Verfügung.

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

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[bundeshaushalt]

poetry install

poetry add deutschland -E bundeshaushalt

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 bundeshaushalt

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import bundeshaushalt
from pprint import pprint
from deutschland.bundeshaushalt.api import budget_data_api
from deutschland.bundeshaushalt.model.bad_request import BadRequest
from deutschland.bundeshaushalt.model.budget_data_response import BudgetDataResponse
# Defining the host is optional and defaults to https://bundeshaushalt.de
# See configuration.py for a list of all supported configuration parameters.
configuration = bundeshaushalt.Configuration(
    host = "https://bundeshaushalt.de"
)



# Enter a context with an instance of the API client
with bundeshaushalt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = budget_data_api.BudgetDataApi(api_client)
    year = 2021 # int | Haushaltsjahr
    account = "expenses" # str | <b>income</b>: Einnahmen. Die Einnahmen des Bundes setzen sich aus Steuern, sonstigen Einnahmen und Krediten zusammen.<br><b>expenses</b>: Ausgaben. Der größte Teil der Ausgaben wird für Sozialausgaben geleistet. Weitere große Ausgabeposten sind die Ausgabebereiche Verteidigung, Verkehrs- und Nachrichtenwesen und auch Bildung und Forschung.
    quota = "actual" # str | <b>target</b>: Sollwerte <i>(default)</i><br><b>actual</b>: Istwerte. (optional)
    unit = "function" # str | <b>single</b>: Einzelplan. <i>(default)</i><br><b>function</b>: Funktion.<br><b>group</b>: Gruppe. (optional)
    id = "090168301" # str | ID, die sich aus der Budgetnummer ergibt. Die Budgetnummer ist eine numerische Bezeichnung im Rahmen der Gliederung des Haushaltsplans, die sich aus der Einzelplan-, Kapitel und Titelnummer zusammensetzt. Gruppen-IDs starten mit 'G-', Funktions-IDs mit 'F-' (optional)

    try:
        # Anfrage von Budgetdaten des Bundeshaushalts.
        api_response = api_instance.budget_data(year, account, quota=quota, unit=unit, id=id)
        pprint(api_response)
    except bundeshaushalt.ApiException as e:
        print("Exception when calling BudgetDataApi->budget_data: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://bundeshaushalt.de

Class Method HTTP request Description
BudgetDataApi budget_data GET /internalapi/budgetData Anfrage von Budgetdaten des Bundeshaushalts.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

anetz@gmx.net

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in bundeshaushalt.apis and bundeshaushalt.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.bundeshaushalt.api.default_api import DefaultApi
  • from deutschland.bundeshaushalt.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 bundeshaushalt
from deutschland.bundeshaushalt.apis import *
from deutschland.bundeshaushalt.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-bundeshaushalt-1.0.0.tar.gz (43.7 kB view hashes)

Uploaded Source

Built Distribution

de_bundeshaushalt-1.0.0-py3-none-any.whl (61.2 kB view hashes)

Uploaded Python 3

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