Metadata-Version: 2.1
Name: de-lebensmittelwarnung
Version: 0.1.0
Summary: Lebensmittelwarnungen API
Home-page: https://github.com/bundesAPI/lebensmittelwarnung-api
License: Apache-2.0
Keywords: OpenAPI,OpenAPI-Generator,lebensmittelwarnung,App,API
Author: BundesAPI
Author-email: kontakt@bund.dev
Requires-Python: >=3.6
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: python-dateutil
Requires-Dist: urllib3 (>=1.25.3)
Project-URL: Bug Tracker, https://github.com/bundesAPI/lebensmittelwarnung-api/issues
Description-Content-Type: text/markdown

# lebensmittelwarnung
Liste aller Lebensmittel und Produktwarnungen

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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

```sh
pip install deutschland[lebensmittelwarnung]
```

### poetry install

```sh
poetry add deutschland -E lebensmittelwarnung
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

## Usage

Import the package:
```python
from deutschland import lebensmittelwarnung
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

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**](docs/DefaultApi.md#list_warnungen) | **POST** /warnings/merged | Liste aller Lebensmittel und Produktwarnungen


## Documentation For Models

 - [InlineObject](docs/InlineObject.md)
 - [RequestOptions](docs/RequestOptions.md)
 - [Response](docs/Response.md)
 - [ResponseDocs](docs/ResponseDocs.md)
 - [ResponseProduct](docs/ResponseProduct.md)
 - [ResponseRapexInformation](docs/ResponseRapexInformation.md)
 - [ResponseSafetyInformation](docs/ResponseSafetyInformation.md)


## 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 *
```


