Ligare.web.middleware

Middleware functionality for handing HTTP requests and responses.

Functions

bind_errorhandler(app, code_or_exception)

register_api_request_handlers(app)

register_api_response_handlers(app)

register_context_middleware(app)

register_error_handlers(app)

Ligare.web.middleware.bind_errorhandler(app, code_or_exception)[source]
Return type:

Callable[[TypeVar(T_error_handler, bound= Union[Callable[..., Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int, Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], WSGIApplication]], Callable[..., Awaitable[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int, Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], WSGIApplication]]]])], Optional[TypeVar(T_error_handler, bound= Union[Callable[..., Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int, Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], WSGIApplication]], Callable[..., Awaitable[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int], tuple[Union[Response, str, bytes, list[Any], Mapping[str, Any], Iterator[str], Iterator[bytes]], int, Union[Headers, Mapping[str, Union[str, list[str], tuple[str, ...]]], Sequence[tuple[str, Union[str, list[str], tuple[str, ...]]]]]], WSGIApplication]]]])]]

Ligare.web.middleware.register_api_request_handlers(app)[source]
Ligare.web.middleware.register_api_response_handlers(app)[source]
Ligare.web.middleware.register_context_middleware(app)[source]
Ligare.web.middleware.register_error_handlers(app)[source]

Modules

consts

String constants used by Ligare.web.

dependency_injection

Ligare.web's integration with Injector and Flask Injector.

feature_flags

Ligare.web's integration with Ligare.platform.feature_flag.

flask

Flask-specific integrations for Ligare.web.

openapi

Connexion and OpenAPI-specific integrations for Ligare.web.

sso

Ligare.web's IAM controls and integration with Ligare.identity.