Stage
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- class Stage(name: str, component: Spec, role: str | None = None)[source]
Bases:
objectOne named step in a habitat dataflow.
- name
Custom label unique within the enclosing HabitatSpec. Defaults to the component registry name when built via
of().- Type:
- component
The pluggable component specification.
- Type:
- role
Optional override for scientific role. Leave
Nonefor user-authored stages – domain code infers the role from position + registry domain. Sugar expansion and dual-domain disambiguation may set this explicitly; it is not required API.- Type:
str | None
- classmethod of(component: Spec | Mapping[str, Any], name: str | None = None, role: str | None = None) Stage[source]
Build a stage, defaulting
nameto the component registry name.- Parameters:
component – Component spec or mapping.
name – Optional custom label.
role – Optional role override (escape hatch). Prefer omitting this and letting
resolve_habitat_stagesinfer the role.
- Returns:
The stage.