lightbulb.features¶
Feature flags that can be used to enable new or different Lightbulb behaviours.
Specify when creating your Client instance:
client = lightbulb.client_from_app(..., features=[...])
Added in version 3.2.0.
- COMMAND_INJECT_CONTEXT = Feature(name='COMMAND_INJECT_CONTEXT', requires_di_enabled=True)¶
Use dependency injection for the
Contextparameter of command invoke methods. Could be useful if you want to provide your own subclass with extra features, without having to both specify the original parameter, and one for your own context type.
- HOOK_INJECT_ALL_PARAMS = Feature(name='HOOK_DI_ALL_PARAMS', requires_di_enabled=True)¶
Use dependency injection for ALL execution hook parameters, allowing any (or both) of the previously-required
ExecutionPipelineandContextparameters to be omitted. Potentially useful if you never use theExecutionPipelineparameter and would like slightly cleaner function signatures.