Property functions

get_inherited_properties(cur, node)

Get the entire inherited property dictionary.

To calculate this, the trees path from root node till node will be traversed. For each level, the property dictionary will be merged into the previous one. This is a simple merge, only the first level of keys will be combined.

Parameters:node (Node or uuid4) –
Return type:dict
get_inherited_property_value(cur, node, key)

Get the inherited value for a single property key.

Parameters:
  • node (Node or uuid4) –
  • key – str
get_nodes_by_property_dict(cur, query)

Return an iterator that yields a NodeData object of every node which contains all key/value pairs of query in its property dictionary. Inherited keys are not considered.

Parameters:query (dict) – The dictionary to search for
get_nodes_by_property_key(cur, key)

Return an iterator that yields a NodeData object of every node which contains key in its property dictionary. Inherited keys are not considered.

Parameters:key (str) – The key to search for
get_nodes_by_property_value(cur, key, value)

Return an iterator that yields a NodeData object of every node which has key exactly set to value in its property dictionary. Inherited keys are not considered.

Parameters:
  • key (str) – The key to search for
  • value (object) – The exact value to sarch for
get_recursive_properties(cur, node)

Get the entire inherited and recursively merged property dictionary.

To calculate this, the trees path from root node till node will be traversed. For each level, the property dictionary will be merged into the previous one. This is a recursive merge, so all dictionary levels will be combined.

Parameters:node (Node or uuid4) –
Return type:dict
set_properties(cur, node, new_properties)

Set the property dictionary to new_properties. Return NodeData object with updated properties.

Parameters:
  • node (Node or uuid4) –
  • new_properties – dict
set_property_value(cur, node, key, value)

Set the value for a single property key. Return NodeData object with updated properties.

Parameters:
  • node (Node or uuid4) –
  • key – str
  • value – object
update_properties(cur, node, new_properties)

Update existing property dictionary with another dictionary. Return NodeData object with updated properties.

Parameters:
  • node (Node or uuid4) –
  • new_properties – dict