Skip to main content

lebensmittelwarnung

Liste aller Lebensmittel und Produktwarnungen

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

  • API version: 1.0.0
  • Package version: 0.1.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[lebensmittelwarnung]

poetry install

poetry add deutschland -E lebensmittelwarnung

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 lebensmittelwarnung

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import lebensmittelwarnung
from pprint import pprint
from deutschland.lebensmittelwarnung.api import default_api
from deutschland.lebensmittelwarnung.model.inline_object import InlineObject
from deutschland.lebensmittelwarnung.model.response import Response
# 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: ApiKeyAuth
configuration.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 client
with lebensmittelwarnung.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_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 Produktwarnungen
        api_response = api_instance.list_warnungen(inline_object=inline_object)
        pprint(api_response)
    except lebensmittelwarnung.ApiException as e:
        print("Exception when calling DefaultApi->list_warnungen: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://megov.bayern.de/verbraucherschutz/baystmuv-verbraucherinfo/rest/api

Class Method HTTP request Description
DefaultApi list_warnungen POST /warnings/merged Liste aller Lebensmittel und Produktwarnungen

Documentation For Models

Documentation For Authorization

ApiKeyAuth

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

Author

kontakt@bund.dev

Notes for Large OpenAPI documents

If 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 DefaultApi
  • from deutschland.lebensmittelwarnung.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 lebensmittelwarnung
from deutschland.lebensmittelwarnung.apis import *
from deutschland.lebensmittelwarnung.models import *

Metadata

Release files for de-lebensmittelwarnung 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for de-lebensmittelwarnung 0.1.0
File Size Uploaded
de-lebensmittelwarnung-0.1.0.tar.gz 42.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for de-lebensmittelwarnung 0.1.0
File Interpreter ABI Platform
de_lebensmittelwarnung-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.2 kB

Release files / de-lebensmittelwarnung-0.1.0.tar.gz

Download URL de-lebensmittelwarnung-0.1.0.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
790f1abc86187ed51ae969c713fd4a07d430a4146af116d8ac36543a70143ac5
BLAKE2b-256 checksum
How to use checksums
404892f18208136c447191b936a86c724e06b4b841de35c36a36a71c6a79fc3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.8

Release files / de_lebensmittelwarnung-0.1.0-py3-none-any.whl

Download URL de_lebensmittelwarnung-0.1.0-py3-none-any.whl
Size 59.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
566c5c444c16dd68b9310c07e55a9d1af9eaf531b383b7390f390f0e6d19edf1
BLAKE2b-256 checksum
How to use checksums
85573101e4e6c3e58109ddcae0efdac764a134eb28e38f10fddc93b86a76a44a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page