RemoteGraph
Methods
| Method | Description |
|---|---|
add_edge | Adds a new edge with the given source and destination nodes and properties to the remote graph. |
add_edges | Batch add edge updates to the remote graph |
add_metadata | Adds metadata to the remote graph. |
add_node | Adds a new node with the given id and properties to the remote graph. |
add_nodes | Batch add node updates to the remote graph |
add_property | Adds properties to the remote graph. |
create_node | Create a new node with the given id and properties to the remote graph and fail if the node already exists. |
delete_edge | Deletes an edge in the remote graph, given the timestamp, src and dst nodes and layer (optional) |
edge | Gets a remote edge with the specified source and destination nodes |
node | Gets a remote node with the specified id |
update_metadata | Updates 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
| Name | Type | Default | Description |
|---|---|---|---|
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 | None | The properties of the edge, as a dict of string and properties. |
layer | str, optional | None | The layer of the edge. |
Returns
| Type | Description |
|---|---|
| RemoteEdge | the remote edge |
add_edges
Signature: add_edges(updates)
Batch add edge updates to the remote graph
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
updates | list[RemoteEdgeAddition] | - | The list of updates you want to apply to the remote graph |
Returns
| Type | Description |
|---|---|
| None |
add_metadata
Signature: add_metadata(properties)
Adds metadata to the remote graph.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
properties | dict | - | The metadata of the graph. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Type | Default | Description |
|---|---|---|---|
timestamp | int | str | datetime | - | The timestamp of the node. |
id | str | int | - | The id of the node. |
properties | dict, optional | None | The properties of the node. |
node_type | str, optional | None | The optional string which will be used as a node type |
Returns
| Type | Description |
|---|---|
| RemoteNode | the new remote node |
add_nodes
Signature: add_nodes(updates)
Batch add node updates to the remote graph
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
updates | list[RemoteNodeAddition] | - | The list of updates you want to apply to the remote graph |
Returns
| Type | Description |
|---|---|
| None |
add_property
Signature: add_property(timestamp, properties)
Adds properties to the remote graph.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
timestamp | int | str | datetime | - | The timestamp of the temporal property. |
properties | dict | - | The temporal properties of the graph. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Type | Default | Description |
|---|---|---|---|
timestamp | int | str | datetime | - | The timestamp of the node. |
id | str | int | - | The id of the node. |
properties | dict, optional | None | The properties of the node. |
node_type | str, optional | None | The optional string which will be used as a node type |
Returns
| Type | Description |
|---|---|
| RemoteNode | the 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
| Name | Type | Default | Description |
|---|---|---|---|
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 | None | The layer of the edge. |
Returns
| Type | Description |
|---|---|
| RemoteEdge | the remote edge |
edge
Signature: edge(src, dst)
Gets a remote edge with the specified source and destination nodes
Parameters
Returns
| Type | Description |
|---|---|
| RemoteEdge | the remote edge reference |
node
Signature: node(id)
Gets a remote node with the specified id
Parameters
Returns
| Type | Description |
|---|---|
| RemoteNode | the remote node reference |
update_metadata
Signature: update_metadata(properties)
Updates metadata on the remote graph.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
properties | dict | - | The metadata of the graph. |
Returns
| Type | Description |
|---|---|
| None |