Skip to content

Wrapper

Generates a complete Kedro project directory structure on disk from a ChoregraphSpec. Produces pyproject.toml, settings.py, catalog.yml, and pipeline_registry.py so that Kedro sessions can execute the pipeline. Acts as the Single Source of Truth bridge between Choregraph's XML model and Kedro's file-based configuration.

wrapper

Managed project builder -- generates Kedro project structure on disk.

Produces the complete Kedro project files (pyproject.toml, settings.py, catalog.yml, pipeline_registry.py) in a pipeline/ directory. The generated project is the single source of truth for Kedro session execution.

ManagedProjectBuilder

ManagedProjectBuilder(workspace_path)

Generates a standard Kedro project structure from a ChoregraphSpec. This acts as the Single Source of Truth for the Kedro run.

Source code in src/choregraph/wrapper.py
def __init__(self, workspace_path: Path):
    self.workspace_path = workspace_path
    self.wrapper_dir = self.workspace_path / "pipeline"

build

build(spec, transform_registry, include_viz_hooks=True)

Builds the Kedro project files.

PARAMETER DESCRIPTION
spec

The choregraph specification.

TYPE: ChoregraphSpec

transform_registry

Transform function registry.

TYPE: Dict[str, Any]

include_viz_hooks

If True (web flow), include kedro-viz hooks in settings.py. If False (Toolkit mode), skip them.

TYPE: bool DEFAULT: True

Source code in src/choregraph/wrapper.py
def build(self, spec: ChoregraphSpec, transform_registry: Dict[str, Any], include_viz_hooks: bool = True):
    """Builds the Kedro project files.

    Args:
        spec: The choregraph specification.
        transform_registry: Transform function registry.
        include_viz_hooks: If True (web flow), include kedro-viz hooks
            in settings.py. If False (Toolkit mode), skip them.
    """
    self._ensure_directories()
    self._generate_pyproject()
    self._generate_settings(include_viz_hooks=include_viz_hooks)
    self._generate_catalog(spec, transform_registry)
    self._generate_pipeline_registry(spec, transform_registry)