architxt.database.export.graph#

Functions

export_graph(forest, *, session)

Export the graph instance as a dictionary using Neo4j.

export_group(group, *, session)

Export the group to the graph.

export_relation(tree, *, session)

Export the relation to the graph.

export_tree(tree, *, session)

Export the tree to the graph.

get_properties(node)

Get the properties of a node.

architxt.database.export.graph.export_graph(forest, *, session)[source]#

Export the graph instance as a dictionary using Neo4j.

Parameters:
  • session (Session) – Neo4j session.

  • forest (Iterable[Tree]) – The forest to export.

Return type:

None

Returns:

A generator that yields dictionaries representing the graph.

architxt.database.export.graph.export_group(group, *, session)[source]#

Export the group to the graph.

Parameters:
  • group (Tree) – Group to export.

  • session (Session) – Neo4j session.

Return type:

None

architxt.database.export.graph.export_relation(tree, *, session)[source]#

Export the relation to the graph.

Parameters:
  • tree (Tree) – Relation to export.

  • session (Session) – Neo4j session.

Return type:

None

architxt.database.export.graph.export_tree(tree, *, session)[source]#

Export the tree to the graph.

Parameters:
  • tree (Tree) – Tree to export.

  • session (Session) – Neo4j session.

Return type:

None

architxt.database.export.graph.get_properties(node)[source]#

Get the properties of a node.

Parameters:

node (Tree) – Node to get properties from.

Return type:

dict[str, str]

Returns:

Dictionary of properties.