class pyArango.graph.Graph(database, jsonInit)[source]

The class from witch all your graph types must derive

createEdge(collectionName, _fromId, _toId, edgeAttributes, waitForSync=False)[source]

creates an edge between two documents

createVertex(collectionName, docAttributes, waitForSync=False)[source]

adds a vertex to the graph and returns it


deletes the graph

deleteEdge(edge, waitForSync=False)[source]

removes an edge from the graph

deleteVertex(document, waitForSync=False)[source]

deletes a vertex from the graph as well as al linked edges

A shorthand for createEdge that takes two documents as input

traverse(startVertex, **kwargs)[source]

Traversal! see: for a full list of the possible kwargs. The function must have as argument either: direction = “outbout”/”any”/”inbound” or expander = “custom JS (see arangodb’s doc)”. The function can’t have both ‘direction’ and ‘expander’ as arguments.

deletes all links between doc1 and doc2


alias for Graph_metaclass.getGraphClass()


alias for Graph_metaclass.isGraph()


returns a dictionary of all defined graph classes

class pyArango.graph.Graph_metaclass[source]

Keeps track of all graph classes and does basic validations on fields

classmethod getGraphClass(name)[source]

return a graph class by its name

classmethod isGraph(name)[source]

returns true/false depending if there is a graph called name

class pyArango.graph.EdgeDefinition(edgesCollection, fromCollections, toCollections)[source]

An edge definition for a graph