Skip to content

composition

Project configuration and options.

Bases: BaseModel

Composition of templates for a project.

Bases: BaseModel

A rendered composition of templates for a project.

layer_names: List[str]

Return a list of the names of all the layers.

layers: List[RenderedLayer]

Rendered layers.

render_dir: DirectoryPath

The directory in which the layers were rendered.

The render_dir + rendered_name is the location of the project.

rendered_name: str

The name of the rendered project.

get_context_for_layer(
    composition: RenderedComposition,
    index: Optional[int] = None,
) -> dict

Merge the contexts for all layers up to index.

An index of None does all the layers.

Parameters:

composition

The rendered composition

TYPE: RenderedComposition

index

Merge the contexts of the layers up to this 0-based index. None to do all layers.

TYPE: Optional[int]

DEFAULT: None

Returns:

dict

The comprehensively merged context