RaphtoryClient

A client for handling GraphQL operations in the context of Raphtory.

Methods

MethodDescription
copy_graphCopy graph from a path path on the server to a new_path on the server
create_indexCreate Index for graph on the server at 'path'
delete_graphDelete graph from a path path on the server
is_server_onlineCheck if the server is online.
move_graphMove graph from a path path on the server to a new_path on the server
new_graphCreate a new empty Graph on the server at path
queryMake a GraphQL query against the server.
receive_graphReceive graph from a path path on the server
remote_graphGet a RemoteGraph reference to a graph on the server at path
send_graphSend a graph to the server
upload_graphUpload graph file from a path file_path on the client

Method Details

copy_graph

Signature: copy_graph(path, new_path)

Copy graph from a path path on the server to a new_path on the server

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph to be copied
new_pathstr-the new path of the copied graph

Returns

TypeDescription
None

create_index

Signature: create_index(path, index_spec, in_ram=True)

Create Index for graph on the server at 'path'

Parameters

NameTypeDefaultDescription
RemoteIndexSpecRemoteIndexSpec-spec specifying the properties that need to be indexed
in_rambool, optionalTruecreate index in ram
pathAny-
index_specAny-

Returns

TypeDescription
None

delete_graph

Signature: delete_graph(path)

Delete graph from a path path on the server

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph to be deleted

Returns

TypeDescription
None

is_server_online

Check if the server is online.

Returns

TypeDescription
boolReturns true if server is online otherwise false.

move_graph

Signature: move_graph(path, new_path)

Move graph from a path path on the server to a new_path on the server

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph to be moved
new_pathstr-the new path of the moved graph

Returns

TypeDescription
None

new_graph

Signature: new_graph(path, graph_type)

Create a new empty Graph on the server at path

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph to be created
graph_typeLiteral["EVENT", "PERSISTENT"]-the type of graph that should be created - this can be EVENT or PERSISTENT

Returns

TypeDescription
None

query

Signature: query(query, variables=None)

Make a GraphQL query against the server.

Parameters

NameTypeDefaultDescription
querystr-the query to make.
variablesdict[str, Any], optionalNonea dict of variables present on the query and their values.

receive_graph

Signature: receive_graph(path)

Receive graph from a path path on the server

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph to be received

remote_graph

Signature: remote_graph(path)

Get a RemoteGraph reference to a graph on the server at path

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph to be created

Returns

TypeDescription
RemoteGraphthe remote graph reference

send_graph

Signature: send_graph(path, graph, overwrite=False)

Send a graph to the server

Parameters

NameTypeDefaultDescription
pathstr-the path of the graph
graphGraph | PersistentGraph-the graph to send
overwritebool, optionalFalseoverwrite existing graph. Defaults to False.

upload_graph

Signature: upload_graph(path, file_path, overwrite=False)

Upload graph file from a path file_path on the client

Parameters

NameTypeDefaultDescription
pathstr-the name of the graph
file_pathstr-the path of the graph on the client
overwritebool, optionalFalseoverwrite existing graph. Defaults to False.