RemoteGraph

Methods

MethodDescription
add_edgeAdds a new edge with the given source and destination nodes and properties to the remote graph.
add_edgesBatch add edge updates to the remote graph
add_metadataAdds metadata to the remote graph.
add_nodeAdds a new node with the given id and properties to the remote graph.
add_nodesBatch add node updates to the remote graph
add_propertyAdds properties to the remote graph.
create_nodeCreate a new node with the given id and properties to the remote graph and fail if the node already exists.
delete_edgeDeletes an edge in the remote graph, given the timestamp, src and dst nodes and layer (optional)
edgeGets a remote edge with the specified source and destination nodes
nodeGets a remote node with the specified id
update_metadataUpdates metadata on the remote graph.

Method Details

add_edge

Signature: add_edge(timestamp, src, dst, properties=None, layer=None)

Adds a new edge with the given source and destination nodes and properties to the remote graph.

Parameters

NameTypeDefaultDescription
timestampint | str | datetime-The timestamp of the edge.
srcstr | int-The id of the source node.
dststr | int-The id of the destination node.
propertiesdict, optionalNoneThe properties of the edge, as a dict of string and properties.
layerstr, optionalNoneThe layer of the edge.

Returns

TypeDescription
RemoteEdgethe remote edge

add_edges

Signature: add_edges(updates)

Batch add edge updates to the remote graph

Parameters

NameTypeDefaultDescription
updateslist[RemoteEdgeAddition]-The list of updates you want to apply to the remote graph

Returns

TypeDescription
None

add_metadata

Signature: add_metadata(properties)

Adds metadata to the remote graph.

Parameters

NameTypeDefaultDescription
propertiesdict-The metadata of the graph.

Returns

TypeDescription
None

add_node

Signature: add_node(timestamp, id, properties=None, node_type=None)

Adds a new node with the given id and properties to the remote graph.

Parameters

NameTypeDefaultDescription
timestampint | str | datetime-The timestamp of the node.
idstr | int-The id of the node.
propertiesdict, optionalNoneThe properties of the node.
node_typestr, optionalNoneThe optional string which will be used as a node type

Returns

TypeDescription
RemoteNodethe new remote node

add_nodes

Signature: add_nodes(updates)

Batch add node updates to the remote graph

Parameters

NameTypeDefaultDescription
updateslist[RemoteNodeAddition]-The list of updates you want to apply to the remote graph

Returns

TypeDescription
None

add_property

Signature: add_property(timestamp, properties)

Adds properties to the remote graph.

Parameters

NameTypeDefaultDescription
timestampint | str | datetime-The timestamp of the temporal property.
propertiesdict-The temporal properties of the graph.

Returns

TypeDescription
None

create_node

Signature: create_node(timestamp, id, properties=None, node_type=None)

Create a new node with the given id and properties to the remote graph and fail if the node already exists.

Parameters

NameTypeDefaultDescription
timestampint | str | datetime-The timestamp of the node.
idstr | int-The id of the node.
propertiesdict, optionalNoneThe properties of the node.
node_typestr, optionalNoneThe optional string which will be used as a node type

Returns

TypeDescription
RemoteNodethe new remote node

delete_edge

Signature: delete_edge(timestamp, src, dst, layer=None)

Deletes an edge in the remote graph, given the timestamp, src and dst nodes and layer (optional)

Parameters

NameTypeDefaultDescription
timestampint-The timestamp of the edge.
srcstr | int-The id of the source node.
dststr | int-The id of the destination node.
layerstr, optionalNoneThe layer of the edge.

Returns

TypeDescription
RemoteEdgethe remote edge

edge

Signature: edge(src, dst)

Gets a remote edge with the specified source and destination nodes

Parameters

NameTypeDefaultDescription
srcstr | int-the source node id
dststr | int-the destination node id

Returns

TypeDescription
RemoteEdgethe remote edge reference

node

Signature: node(id)

Gets a remote node with the specified id

Parameters

NameTypeDefaultDescription
idstr | int-the node id

Returns

TypeDescription
RemoteNodethe remote node reference

update_metadata

Signature: update_metadata(properties)

Updates metadata on the remote graph.

Parameters

NameTypeDefaultDescription
propertiesdict-The metadata of the graph.

Returns

TypeDescription
None