Skip to content

RemoteGraph #

Bases: object

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:

Name Type Description Default
timestamp int | str | datetime

The timestamp of the edge.

required
src str | int

The id of the source node.

required
dst str | int

The id of the destination node.

required
properties dict

The properties of the edge, as a dict of string and properties.

None
layer str

The layer of the edge.

None

Returns:

Type Description
RemoteEdge

the remote edge

add_edges(updates) #

Batch add edge updates to the remote graph

Parameters:

Name Type Description Default
updates List[RemoteEdgeAddition]

The list of updates you want to apply to the remote graph

required

Returns:

Type Description
None

add_metadata(properties) #

Adds metadata to the remote graph.

Parameters:

Name Type Description Default
properties dict

The metadata of the graph.

required

Returns:

Type Description
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:

Name Type Description Default
timestamp int | str | datetime

The timestamp of the node.

required
id str | int

The id of the node.

required
properties dict

The properties of the node.

None
node_type str

The optional string which will be used as a node type

None

Returns:

Type Description
RemoteNode

the new remote node

add_nodes(updates) #

Batch add node updates to the remote graph

Parameters:

Name Type Description Default
updates List[RemoteNodeAddition]

The list of updates you want to apply to the remote graph

required

Returns:

Type Description
None

add_property(timestamp, properties) #

Adds properties to the remote graph.

Parameters:

Name Type Description Default
timestamp int | str | datetime

The timestamp of the temporal property.

required
properties dict

The temporal properties of the graph.

required

Returns:

Type Description
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:

Name Type Description Default
timestamp int | str | datetime

The timestamp of the node.

required
id str | int

The id of the node.

required
properties dict

The properties of the node.

None
node_type str

The optional string which will be used as a node type

None

Returns:

Type Description
RemoteNode

the new remote node

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:

Name Type Description Default
timestamp int

The timestamp of the edge.

required
src str | int

The id of the source node.

required
dst str | int

The id of the destination node.

required
layer str

The layer of the edge.

None

Returns:

Type Description
RemoteEdge

the remote edge

edge(src, dst) #

Gets a remote edge with the specified source and destination nodes

Parameters:

Name Type Description Default
src str | int

the source node id

required
dst str | int

the destination node id

required

Returns:

Type Description
RemoteEdge

the remote edge reference

node(id) #

Gets a remote node with the specified id

Parameters:

Name Type Description Default
id str | int

the node id

required

Returns:

Type Description
RemoteNode

the remote node reference

update_metadata(properties) #

Updates metadata on the remote graph.

Parameters:

Name Type Description Default
properties dict

The metadata of the graph.

required

Returns:

Type Description
None