project_create_from_layers()
Create a project from a layers file (the format framework.pub sends).
With interactive=False (the default) it runs headless for automation,
as project_create(headless=True) describes.
Usage
project_create_from_layers(
layers_file: str | Path,
path: str | Path = '.',
interactive: bool = False,
) -> Path
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| layers_file required | str | Path |
A JSON file with |
|
| path | str | Path | '.' |
The project folder. Default: the current directory. In headless mode it must be a fresh checkout. Otherwise it must not exist. |
| interactive | bool | False |
Create the project in regular mode, with git initialization and a registry entry. Nothing is prompted for either way. Default: False, which creates it headless. |
Value
The project folder.
Raises
FrameworkError: When the layers file cannot be read, has an unsupportedspec_version, or has no name, or when the project cannot be created there.SpecError: When the resolved spec is invalid.