Skip to main content

StepFormatter

Graph formatter for :class:Blueprint.

Attributes

AttributeTypeDescription
blueprint_prefixstring = ⧉Visual symbol used as a prefix for labels of steps marked as the last step in a blueprint.
conditional_prefixstring = ∘Visual symbol used as a prefix for labels of steps that are defined as conditional.
blueprint_schemedict = {'shape': 'parallelogram', 'color': 'slategray4', 'fillcolor': 'slategray3'}Dictionary of Graphviz attributes defining the visual style, including shape and color, for blueprint nodes.

Methods


label()

@classmethod
def label(
step: [Step](step.md?sid=celery_bootsteps_step)
) - > string

Generates a formatted string label for a step, combining a type-specific prefix with the step's identifier or default label.

Parameters

NameTypeDescription
step[Step](step.md?sid=celery_bootsteps_step)The blueprint step object to generate a label for

Returns

TypeDescription
stringThe prefixed and encoded label string for the step, or None if no step is provided

node()

@classmethod
def node(
obj: [Step](step.md?sid=celery_bootsteps_step),
**attrs: dict
) - > object

Renders a graph node for a step, applying specialized parallelogram styling if the object is a terminal blueprint step.

Parameters

NameTypeDescription
obj[Step](step.md?sid=celery_bootsteps_step)The step object to be rendered as a graph node
**attrsdictAdditional Graphviz attributes to apply to the node

Returns

TypeDescription
objectThe rendered node object produced by the underlying draw_node method

edge()

@classmethod
def edge(
a: [Step](step.md?sid=celery_bootsteps_step),
b: [Step](step.md?sid=celery_bootsteps_step),
**attrs: dict
) - > object

Renders a graph edge between two steps, modifying the arrow style and color if the source step is a terminal blueprint node.

Parameters

NameTypeDescription
a[Step](step.md?sid=celery_bootsteps_step)The source step node where the edge originates
b[Step](step.md?sid=celery_bootsteps_step)The destination step node where the edge points
**attrsdictAdditional Graphviz attributes to apply to the edge

Returns

TypeDescription
objectThe rendered edge object produced by the underlying draw_edge method