gemd.entity.template.has_parameter_templates module

For entities that have a parameter template.

class gemd.entity.template.has_parameter_templates.HasParameterTemplates(parameters: Iterable[Union[ParameterTemplate, LinkByUID, Tuple[Union[ParameterTemplate, LinkByUID], Optional[BaseBounds]]]])

Bases: HasDependencies

Mixin-trait for entities that include parameter templates.

Parameters

parameters (List[(ParameterTemplate, BaseBounds)]) – A list of tuples containing this entity’s parameter templates as well as any restrictions on those templates’ bounds.

validate_parameter(parameter: ParameterType) bool

Check if the parameter is consistent w/ this template.

property parameters: List[Union[ParameterTemplate, LinkByUID]]

Get the list of parameter template/bounds tuples.

Returns

List of this entity’s parameter template/bounds pairs

Return type

List[(ParameterTemplate, BaseBounds)]