craft_parts.plugins.properties module¶
Definitions and helpers for plugin options.
- class craft_parts.plugins.properties.PluginProperties(**data)[source]¶
Bases:
BaseModel
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
]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'plugin': FieldInfo(annotation=str, required=False, default='', alias='plugin', alias_priority=1), 'source': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias='source', alias_priority=1)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- classmethod model_properties(cls)[source]¶
Get the properties for this model from the JSON schema.
- Return type:
dict
[str
,dict
[str
,Any
]]
-
plugin:
str
¶
-
source:
str
|None
¶