1"""
2Connexion is a framework that automagically handles HTTP requests based on OpenAPI Specification
3(formerly known as Swagger Spec) of your API described in YAML format. Connexion allows you to
4write an OpenAPI specification, then maps the endpoints to your Python functions; this makes it
5unique, as many tools generate the specification based on your Python code. You can describe your
6REST API in as much detail as you want; then Connexion guarantees that it will work as you
7specified.
8"""
9
10from .apps import AbstractApp # NOQA
11from .apps.asynchronous import AsyncApp
12from .datastructures import NoContent # NOQA
13from .exceptions import ProblemException # NOQA
14from .problem import problem # NOQA
15from .resolver import Resolution, Resolver, RestyResolver # NOQA
16from .utils import not_installed_error # NOQA
17
18try:
19 from connexion.apps.flask import FlaskApi, FlaskApp
20except ImportError as e: # pragma: no cover
21 _flask_not_installed_error = not_installed_error(
22 e, msg="Please install connexion using the 'flask' extra"
23 )
24 FlaskApi = _flask_not_installed_error # type: ignore
25 FlaskApp = _flask_not_installed_error # type: ignore
26
27from connexion.apps.asynchronous import AsyncApi, AsyncApp
28from connexion.context import request
29from connexion.middleware import ConnexionMiddleware
30
31App = FlaskApp
32Api = FlaskApi