Step
A Bootstep.
Attributes
| Attribute | Type | Description |
|---|---|---|
| name | string = null | Optional step name, will use qualname if not specified. |
| label | string = null | Optional short name used for graph outputs and in logs. |
| conditional | boolean = false | Set this to true if the step is enabled based on some condition. |
| requires | tuple = () | List of other steps that must be started before this step. |
| last | boolean = false | This flag is reserved for the workers Consumer, since it is required to always be started last. |
| enabled | boolean = true | This provides the default for :meth:include_if. |
Constructor
Signature
def Step(
parent: Any,
**kwargs: dict
)
Parameters
| Name | Type | Description |
|---|---|---|
| parent | Any | The parent object to which this step is bound. |
| **kwargs | dict | Additional keyword arguments for step initialization. |
Methods
include_if()
@classmethod
def include_if(
parent: object
) - > boolean
Return true if bootstep should be included.
Parameters
| Name | Type | Description |
|---|---|---|
| parent | object | The parent object (e.g., a Consumer or Worker) to which this step is being bound. |
Returns
| Type | Description |
|---|---|
boolean | A boolean indicating whether the step should be included in the blueprint based on the current parent state. |
instantiate()
@classmethod
def instantiate(
name: string,
*args: any,
**kwargs: any
) - > object
Creates a new instance of a class or utility by name, passing through any provided arguments.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The name or path of the class to be instantiated. |
| *args | any | Positional arguments passed to the constructor of the target class. |
| **kwargs | any | Keyword arguments passed to the constructor of the target class. |
Returns
| Type | Description |
|---|---|
object | A new instance of the specified class or component. |
include()
@classmethod
def include(
parent: object
) - > boolean
Checks if the step should be included in the current execution context.
Parameters
| Name | Type | Description |
|---|---|---|
| parent | object | The parent object context used to evaluate the inclusion predicate. |
Returns
| Type | Description |
|---|---|
boolean | True if the step's inclusion predicate is satisfied, False otherwise. |
create()
@classmethod
def create(
parent: object
) - > any
Create the step.
Parameters
| Name | Type | Description |
|---|---|---|
| parent | object | The parent object context in which this step is being created. |
Returns
| Type | Description |
|---|---|
any | The result of the step creation process, often a service or component instance. |
alias()
@classmethod
def alias() - > string
Retrieves the display name for the step, prioritizing the explicit label over the default calculated label.
Returns
| Type | Description |
|---|---|
string | The short name or label used for logging and graph visualization. |
info()
@classmethod
def info(
obj: object
)
Provides diagnostic or state information about the step relative to a specific object.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | object | The object context from which to extract or report information. |