Remote Graph#
- class raphtory.graphql.RemoteGraph(path, client)#
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.
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.
- 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:
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
- 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:
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
- 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.
- 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:
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:
RemoteEdge
- node(id)#
Gets a remote node with the specified id
- Parameters:
id (str|int) – the node id
- Returns:
RemoteNode
- update_constant_properties(properties)#
Updates constant properties on the remote graph.
- Parameters:
properties (dict) – The constant properties of the graph.
- class raphtory.graphql.RemoteNode(path, client, id)#
Bases:
object
Methods:
add_constant_properties
(properties)Add constant properties to a node in the remote graph.
add_updates
(t[, properties])Add updates to a node in the remote graph at a specified time.
set_node_type
(new_type)Set the type on the node.
update_constant_properties
(properties)Update constant properties of a node in the remote graph overwriting existing values.
- add_constant_properties(properties)#
Add constant properties to a node in the remote graph. This function is used to add properties to a node that remain constant and does not change over time. These properties are fundamental attributes of the node.
- Parameters:
properties (Dict[str, Prop]) – A dictionary of properties to be added to the node.
- add_updates(t, properties=None)#
Add updates to a node in the remote graph at a specified time. This function allows for the addition of property updates to a node within the graph. The updates are time-stamped, meaning they are applied at the specified time.
- Parameters:
t (int | str | datetime) – The timestamp at which the updates should be applied.
properties (Dict[str, Prop], optional) – A dictionary of properties to update.
- set_node_type(new_type)#
Set the type on the node. This only works if the type has not been previously set, otherwise will throw an error
- Parameters:
new_type (str) – The new type to be set
- update_constant_properties(properties)#
Update constant properties of a node in the remote graph overwriting existing values. This function is used to add properties to a node that remain constant and do not change over time. These properties are fundamental attributes of the node.
- Parameters:
properties (Dict[str, Prop]) – A dictionary of properties to be added to the node.
- class raphtory.graphql.RemoteEdge(path, client, src, dst)#
Bases:
object
Methods:
add_constant_properties
(properties[, layer])Add constant properties to the edge within the remote graph.
add_updates
(t[, properties, layer])Add updates to an edge in the remote graph at a specified time.
delete
(t[, layer])Mark the edge as deleted at the specified time.
update_constant_properties
(properties[, layer])Update constant properties of an edge in the remote graph overwriting existing values.
- add_constant_properties(properties, layer=None)#
Add constant properties to the edge within the remote graph. This function is used to add properties to an edge that remain constant and do not change over time. These properties are fundamental attributes of the edge.
- Parameters:
properties (Dict[str, Prop]) – A dictionary of properties to be added to the edge.
layer (str, optional) – The layer you want these properties to be added on to.
- add_updates(t, properties=None, layer=None)#
Add updates to an edge in the remote graph at a specified time. This function allows for the addition of property updates to an edge within the graph. The updates are time-stamped, meaning they are applied at the specified time.
- Parameters:
t (int | str | datetime) – The timestamp at which the updates should be applied.
properties (Optional[Dict[str, Prop]]) – A dictionary of properties to update.
layer (str, optional) – The layer you want the updates to be applied.
- delete(t, layer=None)#
Mark the edge as deleted at the specified time.
- Parameters:
t (int | str | datetime) – The timestamp at which the deletion should be applied.
layer (str, optional) – The layer you want the deletion applied to.
- update_constant_properties(properties, layer=None)#
Update constant properties of an edge in the remote graph overwriting existing values. This function is used to add properties to an edge that remains constant and does not change over time. These properties are fundamental attributes of the edge.
- Parameters:
properties (Dict[str, Prop]) – A dictionary of properties to be added to the edge.
layer (str, optional) – The layer you want these properties to be added on to.
- class raphtory.graphql.RemoteNodeAddition(name, node_type=None, constant_properties=None, updates=None)#
Bases:
object
- class raphtory.graphql.RemoteEdgeAddition(src, dst, layer=None, constant_properties=None, updates=None)#
Bases:
object
- class raphtory.graphql.RemoteUpdate(time, properties=None)#
Bases:
object