Ligare.web.middleware.dependency_injection
Ligare.web’s integration with Injector and Flask Injector.
Functions
|
Bind any Connexion middleware classes whose __call__ member has a __bindings__ attribute. |
|
|
|
Configures dependency injection and registers all Flask application dependencies. |
Classes
|
|
Enables dependency injection for any blueprint methods. |
|
|
|
|
- protocol Ligare.web.middleware.dependency_injection.MiddlewareRoutine[source]
typing.Protocol
.Classes that implement this protocol must have the following methods / attributes:
- class Ligare.web.middleware.dependency_injection.OpenAPIEndpointDependencyInjectionMiddleware(flask_injector: FlaskInjector)[source]
Enables dependency injection for any blueprint methods.
- class Ligare.web.middleware.dependency_injection.WebJSONFormatter(fmt_dict=None, time_format='%Y-%m-%dT%H:%M:%S', msec_format='%s.%03dZ')[source]
- __init__(fmt_dict=None, time_format='%Y-%m-%dT%H:%M:%S', msec_format='%s.%03dZ')[source]
Initialize the formatter with specified format strings.
Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.
Use a style parameter of ‘%’, ‘{’ or ‘$’ to specify that you want to use one of %-formatting,
str.format()
({}
) formatting orstring.Template
formatting in your format string.Changed in version 3.2: Added the
style
parameter.
- class Ligare.web.middleware.dependency_injection.WebJSONLoggerModule(name=None, log_level=20, log_to_stdout=False, formatter=None)[source]