StepFormatter
Graph formatter for :class:Blueprint.
Attributes
| Attribute | Type | Description |
|---|---|---|
| blueprint_prefix | string = ⧉ | Visual symbol used as a prefix for labels of steps marked as the last step in a blueprint. |
| conditional_prefix | string = ∘ | Visual symbol used as a prefix for labels of steps that are defined as conditional. |
| blueprint_scheme | dict = {'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
| Name | Type | Description |
|---|---|---|
| step | [Step](step.md?sid=celery_bootsteps_step) | The blueprint step object to generate a label for |
Returns
| Type | Description |
|---|---|
string | The 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
| Name | Type | Description |
|---|---|---|
| obj | [Step](step.md?sid=celery_bootsteps_step) | The step object to be rendered as a graph node |
| **attrs | dict | Additional Graphviz attributes to apply to the node |
Returns
| Type | Description |
|---|---|
object | The 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
| Name | Type | Description |
|---|---|---|
| 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 |
| **attrs | dict | Additional Graphviz attributes to apply to the edge |
Returns
| Type | Description |
|---|---|
object | The rendered edge object produced by the underlying draw_edge method |