Node

class nx_arangodb.classes.dict.node.NodeDict(db: StandardDatabase, graph: Graph, default_node_type: str, read_parallelism: int, read_batch_size: int, *args: Any, **kwargs: Any)[source]

The outer-level of the dict of dict structure representing the nodes (vertices) of a graph.

The outer dict is keyed by ArangoDB Vertex IDs and the inner dict is keyed by Vertex attributes.

Parameters

dbarango.database.StandardDatabase

The ArangoDB database.

grapharango.graph.Graph

The ArangoDB graph object.

default_node_typestr

The default node type for the graph.

read_parallelismint

The number of parallel threads to use for reading data in _fetch_all.

read_batch_sizeint

The number of documents to read in each batch in _fetch_all.

Example

>>> G = nxadb.Graph("MyGraph")
>>> G.add_node('node/1', foo='bar')
>>> G.nodes
class nx_arangodb.classes.dict.node.NodeAttrDict(db: StandardDatabase, graph: Graph, *args: Any, **kwargs: Any)[source]

The inner-level of the dict of dict structure representing the nodes (vertices) of a graph.

Parameters

dbarango.database.StandardDatabase

The ArangoDB database.

grapharango.graph.Graph

The ArangoDB graph object.

Example

>>> G = nxadb.Graph("MyGraph")
>>> G.add_node('node/1', foo='bar')
>>> G.nodes['node/1']['foo']
'bar'