Skip to main content

Step

A Bootstep.

Attributes

AttributeTypeDescription
namestring = nullOptional step name, will use qualname if not specified.
labelstring = nullOptional short name used for graph outputs and in logs.
conditionalboolean = falseSet this to true if the step is enabled based on some condition.
requirestuple = ()List of other steps that must be started before this step.
lastboolean = falseThis flag is reserved for the workers Consumer, since it is required to always be started last.
enabledboolean = trueThis provides the default for :meth:include_if.

Constructor

Signature

def Step(
parent: Any,
**kwargs: dict
)

Parameters

NameTypeDescription
parentAnyThe parent object to which this step is bound.
**kwargsdictAdditional keyword arguments for step initialization.

Methods


include_if()

@classmethod
def include_if(
parent: object
) - > boolean

Return true if bootstep should be included.

Parameters

NameTypeDescription
parentobjectThe parent object (e.g., a Consumer or Worker) to which this step is being bound.

Returns

TypeDescription
booleanA 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

NameTypeDescription
namestringThe name or path of the class to be instantiated.
*argsanyPositional arguments passed to the constructor of the target class.
**kwargsanyKeyword arguments passed to the constructor of the target class.

Returns

TypeDescription
objectA 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

NameTypeDescription
parentobjectThe parent object context used to evaluate the inclusion predicate.

Returns

TypeDescription
booleanTrue if the step's inclusion predicate is satisfied, False otherwise.

create()

@classmethod
def create(
parent: object
) - > any

Create the step.

Parameters

NameTypeDescription
parentobjectThe parent object context in which this step is being created.

Returns

TypeDescription
anyThe 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

TypeDescription
stringThe 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

NameTypeDescription
objobjectThe object context from which to extract or report information.