wireup
wireup.container = DependencyContainer(ParameterBag())
module-attribute
Singleton DI container instance.
Use when your application only needs one container.
wireup.wire(*, param=None, expr=None, qualifier=None)
Inject resources from the container to autowired method arguments.
Arguments are exclusive and only one of them must be used at any time.
Note
Methods MUST be still decorated with autowire for this to work.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param |
str | None
|
Inject a given parameter by name. |
None
|
expr |
str | None
|
Inject a string value using a templated string. Parameters inside |
None
|
qualifier |
ContainerProxyQualifierValue
|
Qualify which implementation to bind when there are multiple components implementing an interface that is registered in the container via |
None
|