citrine.informatics.constraints.categorical_constraint module

class citrine.informatics.constraints.categorical_constraint.AcceptableCategoriesConstraint(*, descriptor_key: str, acceptable_categories: List[str])

Bases: Serializable[AcceptableCategoriesConstraint], Constraint

A constraint on a categorical material attribute to be in a set of acceptable values.

Parameters:
  • descriptor_key (str) – the key corresponding to the associated Categorical descriptor

  • acceptable_categories (list[str]) – the names of the acceptable categories to constrain to

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data)

Return the subtype.

acceptable_categories = None
descriptor_key = None
typ = 'AcceptableCategoriesConstraint'