citrine.gemd_queries.criteria module

Definitions for GemdQuery objects, and their sub-objects.

class citrine.gemd_queries.criteria.AndOperator

Bases: Serializable[AndOperator], Criteria

Combine multiple criteria, requiring EACH to be true for a match.

Parameters:

criteria (Criteria) – List of conditions all responses must satisfy (i.e., joined with an AND).

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

criteria = None
typ = 'and_operator'
class citrine.gemd_queries.criteria.MaterialClassification(value)

Bases: BaseEnumeration

A classification based on where in a Material History you find a Material.

ATOMIC_INGREDIENT = 'atomic_ingredient'
INTERMEDIATE_INGREDIENT = 'intermediate_ingredient'
TERMINAL_MATERIAL = 'terminal_material'
class citrine.gemd_queries.criteria.MaterialRunClassificationCriteria

Bases: Serializable[MaterialRunClassificationCriteria], Criteria

Look for materials with particular classification, defined by MaterialClassification.

Parameters:

classifications (Set[MaterialClassification]) – The classification, based on where in a material history an object appears.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

classifications = None
typ = 'material_run_classification_criteria'
class citrine.gemd_queries.criteria.MaterialTemplatesCriteria

Bases: Serializable[MaterialTemplatesCriteria], Criteria

Look for materials with particular Material Templates and tags.

This has a similar behavior to the old [[MaterialRunByTemplate]] Row definition

Parameters:
  • material_templates_identifiers (Set[UUID]) – Which material templates to filter by.

  • tag_filters (Set[str]) – Which tags to filter by.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

material_templates_identifiers = None
tag_filters = None
typ = 'material_template_criteria'
class citrine.gemd_queries.criteria.NameCriteria

Bases: Serializable[NameCriteria], Criteria

Look for materials with particular names.

Parameters:
  • name (str) – The name the returned objects must have.

  • search_type (TextSearchType) – What kind of string match to use (exact, substring, …).

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

name = None
search_type = None
typ = 'name_criteria'
class citrine.gemd_queries.criteria.OrOperator

Bases: Serializable[OrOperator], Criteria

Combine multiple criteria, requiring ANY to be true for a match.

Parameters:

criteria (Criteria) – List of conditions, at least one of which must match (i.e., joined with an OR).

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

criteria = None
typ = 'or_operator'
class citrine.gemd_queries.criteria.PropertiesCriteria

Bases: Serializable[PropertiesCriteria], Criteria

Look for materials with a particular Property and optionally Value types & ranges.

Parameters:
  • property_templates_filter (Set[UUID]) – The citrine IDs of the property templates matches must reference.

  • value_type_filter (Optional[PropertyFilterType]) – The value range matches must conform to.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

property_templates_filter = None
typ = 'properties_criteria'
value_type_filter = None
class citrine.gemd_queries.criteria.TextSearchType(value)

Bases: BaseEnumeration

The style of text search to run.

EXACT = 'exact'
PREFIX = 'prefix'
SUBSTRING = 'substring'
SUFFIX = 'suffix'