GridWorks DataClasses

GNode DataClass Definition

class gridworks.data_classes.g_node.GNode(g_node_id, *args, **kwargs)
Parameters:

g_node_id (str) –

Return type:

GNode

children()

Returns the list of BaseGnodes identifying this node as parent.

Return type:

List[GNode]

parent()

Raises: DcError if “natural” parent (as suggested by alias) is not Active, and either

  • prev_alias is None, OR

  • the parent as suggested by prev_alias is not Active and/or

does not exist.

Returns:

BaseGNode. Parent BaseGNode
  • If the parent as suggested by the alias exists as an

Active GNode, returns that (“natural” parent)
  • Else, if the parent as suggested by the prev_alais exists

as an active GNode, returns that.

None.
  • If alias is one word long (i.e. root of world)

Return type:

GNode | None

classmethod parent_from_alias(alias)
Returns:

  • GNode. If the parent as suggested by the alias exists as an

Active BaseGNode, returns that. - None. If alias is one word long (i.e. root of world)

Parameters:

alias (str) –

Return type:

GNode | None

GNode DataClass Definition

class gridworks.data_classes.g_node_instance.GNodeInstance(g_node_instance_id, *args, **kwargs)
Parameters:

g_node_instance_id (str) –

Return type:

GNodeInstance

children()

Returns the list of BaseGnodes identifying this node as parent

Return type:

List[GNodeInstance]

parent()

Raises: DcError if “natural” parent (as suggested by alias) is not Active, and either

  • prev_alias is None, OR

  • the parent as suggested by prev_alias is not Active and/or

does not exist.

Returns:

BaseGNode. Parent BaseGNode
  • If the parent as suggested by the alias exists as an

Active GNode, returns that (“natural” parent)
  • Else, if the parent as suggested by the prev_alais exists

as an active GNode, returns that.

None.
  • If alias is one word long (i.e. root of world)

Return type:

GNodeInstance | None

classmethod parent_from_alias(alias)
Returns:

  • GNode. If the parent as suggested by the alias exists as an

Active BaseGNode, returns that. - None. If alias is one word long (i.e. root of world)

Parameters:

alias (str) –

Return type:

GNodeInstance | None

GpsPoint Definition