craft_parts.plugins.properties module

Definitions and helpers for plugin options.

class craft_parts.plugins.properties.PluginProperties(**data)[source]

Bases: PluginPropertiesModel

Options specific to a plugin.

PluginProperties should be subclassed into plugin-specific property classes and populated from a dictionary containing part properties.

By default all plugin properties will be compared to check if the build step is dirty. This can be overridden in each plugin if needed.

Parameters:

data (Any) –

classmethod get_build_properties()[source]

Obtain the list of properties affecting the build stage.

Return type:

List[str]

classmethod get_pull_properties()[source]

Obtain the list of properties affecting the pull stage.

Return type:

List[str]

marshal()[source]

Obtain a dictionary containing the plugin properties.

Return type:

Dict[str, Any]

classmethod unmarshal(data)[source]

Populate class attributes from the part specification.

Parameters:

data (Dict[str, Any]) – A dictionary containing part properties.

Return type:

PluginProperties

Returns:

The populated plugin properties data object.

class craft_parts.plugins.properties.PluginPropertiesModel(**data)[source]

Bases: BaseModel

Model for plugins properties using pydantic validation.

Parameters:

data (Any) –

class Config[source]

Bases: object

Pydantic model configuration.

alias_generator()
allow_mutation = False
extra = 'forbid'
validate_assignment = True