get_parents() function

Get the parents of an entity from itself or its identifier.

Parameters:

Name Type Description Default
entity Union[TaskId, DataNodeId, SequenceId, Task, DataNode, Sequence]

The entity or its identifier to get the parents.

required

Returns:

Type Description
Dict[str, Set[_Entity]]

The dictionary of all parent entities. They are grouped by their type (Scenario^, Sequences^, or tasks^) so each key corresponds to a level of the parents and the value is a set of the parent entities. An empty dictionary is returned if the entity does not have parents.
Example: The following instruction returns all the scenarios that include the datanode identified by "my_datanode_id". taipy.get_parents("id_of_my_datanode")["scenario"]

Raises:

Type Description
ModelNotFound

If entity does not match a correct entity pattern.