to_raw_path#

NodeTree.to_raw_path(node: Union[Node, str]) str[source]#

Converts a node into a raw node path string.

The function does not check if the node exists, but if the node exist the returned raw node path exists in the underlying dictionary.

Parameters:

node (Union[Node, str]) – Node object or string representing the node.

Returns:

Raw node path that can be used a key in the internal dictionary.

Raises:
  • ValueError – If the node is passed as a string in form of a relative

  • path and no prefix can be added.

Return type:

str