Package: de-lebensmittelwarnung
lebensmittelwarnungListe aller Lebensmittel und ProduktwarnungenThis Python package is automatically generated by theOpenAPI Generatorproject:API version: 1.0.0Package version: 0.1.0Build package: org.openapitools.codegen.languages.PythonClientCodegenRequirements.Python >= 3.6Installation & Usagepip installpipinstalldeutschland[lebensmittelwarnung]poetry installpoetryadddeutschland-ElebensmittelwarnungSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)UsageImport the package:fromdeutschlandimportlebensmittelwarnungGetting StartedPlease follow theinstallation procedureand then run the following:importtimefromdeutschlandimportlebensmittelwarnungfrompprintimportpprintfromdeutschland.lebensmittelwarnung.apiimportdefault_apifromdeutschland.lebensmittelwarnung.model.inline_objectimportInlineObjectfromdeutschland.lebensmittelwarnung.model.responseimportResponse# Defining the host is optional and defaults to https://megov.bayern.de/verbraucherschutz/baystmuv-verbraucherinfo/rest/api# See configuration.py for a list of all supported configuration parameters.configuration=lebensmittelwarnung.Configuration(host="https://megov.bayern.de/verbraucherschutz/baystmuv-verbraucherinfo/rest/api")# 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: ApiKeyAuthconfiguration.api_key['ApiKeyAuth']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'# Enter a context with an instance of the API clientwithlebensmittelwarnung.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=default_api.DefaultApi(api_client)inline_object=InlineObject(food=RequestOptions(rows=500,sort="publishedDate desc, title asc",start=11,fq=["publishedDate > 1630067654000"],),products=RequestOptions(rows=500,sort="publishedDate desc, title asc",start=11,fq=["publishedDate > 1630067654000"],),)# InlineObject |  (optional)try:# Liste aller Lebensmittel und Produktwarnungenapi_response=api_instance.list_warnungen(inline_object=inline_object)pprint(api_response)exceptlebensmittelwarnung.ApiExceptionase:print("Exception when calling DefaultApi->list_warnungen:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://megov.bayern.de/verbraucherschutz/baystmuv-verbraucherinfo/rest/apiClassMethodHTTP requestDescriptionDefaultApilist_warnungenPOST/warnings/mergedListe aller Lebensmittel und ProduktwarnungenDocumentation For ModelsInlineObjectRequestOptionsResponseResponseDocsResponseProductResponseRapexInformationResponseSafetyInformationDocumentation For AuthorizationApiKeyAuthType: API keyAPI key parameter name: AuthorizationLocation: HTTP headerAuthorkontakt@bund.devNotes for Large OpenAPI documentsIf the OpenAPI document is large, imports in lebensmittelwarnung.apis and lebensmittelwarnung.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.lebensmittelwarnung.api.default_api import DefaultApifrom deutschland.lebensmittelwarnung.model.pet import PetSolution 2:
Before importing the package, adjust the maximum recursion limit as shown below:import sys
sys.setrecursionlimit(1500)
from deutschland import lebensmittelwarnung
from deutschland.lebensmittelwarnung.apis import *
from deutschland.lebensmittelwarnung.models import *