flask_integration
wireup_init_flask_integration
Integrate wireup with a flask application.
This must be called once all flask configuration and views have been registered.
Updates the container with flask configuration and decorates all views where container objects
are being used making the @container.autowire
decorator no longer needed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flask_app |
Flask
|
The flask application instance |
required |
service_modules |
list[ModuleType]
|
A list of python modules where application services reside. These will be loaded to trigger container registrations. |
required |
dependency_container |
DependencyContainer
|
The instance of the dependency container. The default wireup singleton will be used when this is unset. This will be a noop and have no performance penalty for views which do not use the container. |
container
|
config_prefix |
str | None
|
If set to a value all registered configuration will be prefixed with config and be accessible via "prefix.config_name". E.g: app.DEBUG. |
None
|