Skip to main content

Feiertage API

Project description

feiertage

Deutsche Feiertage per JSON-Webservice (API)

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

  • API version: 1.0.0
  • Package version: 1.0.1
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://bund.dev

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[feiertage]

poetry install

poetry add deutschland -E feiertage

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 feiertage

Getting Started

Please follow the installation procedure and then run the following:

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



# Enter a context with an instance of the API client
with feiertage.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    jahr = "2021" # str | Welches Jahr?
    nur_land = "BW" # str | Welches Bundesland? (optional)
    nur_daten = 1 # int | Nur Daten oder auch Hinweise? (optional)

    try:
        # Get Feiertage
        api_response = api_instance.get_feiertage(jahr, nur_land=nur_land, nur_daten=nur_daten)
        pprint(api_response)
    except feiertage.ApiException as e:
        print("Exception when calling DefaultApi->get_feiertage: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://feiertage-api.de/api

Class Method HTTP request Description
DefaultApi get_feiertage GET / Get Feiertage

Documentation For Models

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 feiertage.apis and feiertage.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.feiertage.api.default_api import DefaultApi
  • from deutschland.feiertage.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 feiertage
from deutschland.feiertage.apis import *
from deutschland.feiertage.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-feiertage-1.0.1.tar.gz (39.4 kB view hashes)

Uploaded Source

Built Distribution

de_feiertage-1.0.1-py3-none-any.whl (43.0 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