RemoteGraph#

class RemoteGraph#

Bases: object

Methods:

add_constant_properties(properties)

Adds constant properties to the remote graph.

add_edge(timestamp, src, dst[, properties, ...])

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

add_edges(updates)

Batch add edge updates to the remote graph

add_node(timestamp, id[, properties, node_type])

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

add_nodes(updates)

Batch add node updates to the remote graph

add_property(timestamp, properties)

Adds properties to the remote graph.

create_node(timestamp, id[, properties, ...])

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

delete_edge(timestamp, src, dst[, layer])

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

edge(src, dst)

Gets a remote edge with the specified source and destination nodes

node(id)

Gets a remote node with the specified id

update_constant_properties(properties)

Updates constant properties on the remote graph.

add_constant_properties(properties)#

Adds constant properties to the remote graph.

Parameters:

properties (dict) – The constant properties of the graph.

Return type:

None

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:
  • timestamp (int | str | datetime) – The timestamp of the edge.

  • src (str | int) – The id of the source node.

  • dst (str | int) – The id of the destination node.

  • properties (dict, optional) – The properties of the edge, as a dict of string and properties.

  • layer (str, optional) – The layer of the edge.

Returns:

the remote edge

Return type:

RemoteEdge

add_edges(updates)#

Batch add edge updates to the remote graph

Parameters:

updates (List[RemoteEdgeAddition]) – The list of updates you want to apply to the remote graph

Return type:

None

add_node(timestamp, id, properties=None, node_type=None)#

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

Parameters:
  • timestamp (int | str | datetime) – The timestamp of the node.

  • id (str | int) – The id of the node.

  • properties (dict, optional) – The properties of the node.

  • node_type (str, optional) – The optional string which will be used as a node type

Returns:

the new remote node

Return type:

RemoteNode

add_nodes(updates)#

Batch add node updates to the remote graph

Parameters:

updates (List[RemoteNodeAddition]) – The list of updates you want to apply to the remote graph

Return type:

None

add_property(timestamp, properties)#

Adds properties to the remote graph.

Parameters:
  • timestamp (int | str | datetime) – The timestamp of the temporal property.

  • properties (dict) – The temporal properties of the graph.

Return type:

None

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:
  • timestamp (int | str | datetime) – The timestamp of the node.

  • id (str | int) – The id of the node.

  • properties (dict, optional) – The properties of the node.

  • node_type (str, optional) – The optional string which will be used as a node type

Returns:

the new remote node

Return type:

RemoteNode

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:
  • timestamp (int) – The timestamp of the edge.

  • src (str | int) – The id of the source node.

  • dst (str | int) – The id of the destination node.

  • layer (str, optional) – The layer of the edge.

Returns:

the remote edge

Return type:

RemoteEdge

edge(src, dst)#

Gets a remote edge with the specified source and destination nodes

Parameters:
  • src (str | int) – the source node id

  • dst (str | int) – the destination node id

Returns:

the remote edge reference

Return type:

RemoteEdge

node(id)#

Gets a remote node with the specified id

Parameters:

id (str | int) – the node id

Returns:

the remote node reference

Return type:

RemoteNode

update_constant_properties(properties)#

Updates constant properties on the remote graph.

Parameters:

properties (dict) – The constant properties of the graph.

Return type:

None