cugraph_service_client.client.CugraphServiceClient#

class cugraph_service_client.client.CugraphServiceClient(host='localhost', port=9090, results_port=9091)[source]#

Client object for cugraph_service, which defines the API that clients can use to access the cugraph_service server.

Methods

batched_ego_graphs(seeds[, radius, graph_id])

Parameters:

call_extension(func_name, *func_args[, ...])

Calls an extension on the server that was previously loaded by a prior call to load_extensions(), then returns the result returned by the extension.

call_graph_creation_extension(func_name, ...)

Calls a graph creation extension on the server that was previously loaded by a prior call to load_graph_creation_extensions(), then returns the graph ID of the graph created by the extension.

close()

Closes a connection to the server if one has been established, allowing other clients to access the server.

create_graph()

Create a new graph associated with a new (non-default) unique graph ID, return the new graph ID.

delete_graph(graph_id)

Deletes the graph referenced by graph_id.

extract_subgraph([create_using, selection, ...])

Return a graph ID for a subgraph of the graph referenced by graph_id that containing vertices and edges that match a selection.

get_graph_edge_data([id_or_ids, ...])

Returns ...

get_graph_edge_property_names([graph_id])

Returns a list of the edge property names for the graph with the given graph id.

get_graph_edge_types([graph_id])

Returns a list of the edge type names for the graph with the given graph id.

get_graph_ids()

Returns a list of all graph IDs the server is currently maintaining.

get_graph_info([keys, graph_id])

Returns a dictionary containing meta-data about the graph referenced by graph_id (or the default graph if not specified).

get_graph_vertex_data([id_or_ids, ...])

Returns ...

get_graph_vertex_property_names([graph_id])

Returns a list of the vertex property names for the graph with the given graph id.

get_graph_vertex_types([graph_id])

Returns a list of the vertex type names for the graph with the given graph id.

get_num_edges([edge_type, graph_id])

Returns the number of edges in the graph with the given graph id.

get_num_vertices([vertex_type, ...])

Returns the number of vertices in the graph with the given graph id.

get_server_info()

Return a dictionary of information about the server.

graph()

Constructs a new RemoteGraph object wrapping a remote PropertyGraph.

is_edge_property(property_key[, graph_id])

Returns True if the given property key is for a valid vertex property in the given graph, false otherwise.e

is_vertex_property(property_key[, graph_id])

Returns True if the given property key is for a valid vertex property in the given graph, False otherwise.

load_csv_as_edge_data(csv_file_name, dtypes, ...)

Reads csv_file_name and applies it as edge data to the graph identified as graph_id (or the default graph if not specified).

load_csv_as_vertex_data(csv_file_name, ...)

Reads csv_file_name and applies it as vertex data to the graph identified as graph_id (or the default graph if not specified).

load_extensions(extension_dir_or_mod_path)

Loads the extensions present in the directory (path on disk), or module or package path (as used in an import statement) specified by extension_dir_or_mod_path.

load_graph_creation_extensions(...)

Loads the extensions for graph creation present in the directory specified by extension_dir_path.

node2vec(start_vertices, max_depth[, graph_id])

Computes random walks for each node in 'start_vertices', under the node2vec sampling framework.

open([call_timeout])

Opens a connection to the server at self.host/self.port if one is not already established.

pagerank([graph_id])

renumber_edges_by_type([prev_id_column, ...])

Renumbers the edges in the graph referenced by graph id to be contiguous by edge type.

renumber_vertices_by_type([prev_id_column, ...])

Renumbers the vertices in the graph referenced by graph id to be contiguous by vertex type.

uniform_neighbor_sample(start_list, fanout_vals)

Samples the graph and returns a UniformNeighborSampleResult instance.

unload_extension_module(modname)

Removes all extensions contained in the modname module.

uptime()

Return the server uptime in seconds.

get_edge_IDs_for_vertices

__init__(host='localhost', port=9090, results_port=9091)[source]#

Creates a connection to a cugraph_service server running on host/port.

Parameters:
hoststring, defaults to 127.0.0.1

Hostname where the cugraph_service server is running

portint, defaults to 9090

Port number where the cugraph_service server is listening

Returns:
CugraphServiceClient object

Examples

>>> from cugraph_service_client import CugraphServiceClient
>>> client = CugraphServiceClient()

Methods

__init__([host, port, results_port])

Creates a connection to a cugraph_service server running on host/port.

batched_ego_graphs(seeds[, radius, graph_id])

Parameters:

call_extension(func_name, *func_args[, ...])

Calls an extension on the server that was previously loaded by a prior call to load_extensions(), then returns the result returned by the extension.

call_graph_creation_extension(func_name, ...)

Calls a graph creation extension on the server that was previously loaded by a prior call to load_graph_creation_extensions(), then returns the graph ID of the graph created by the extension.

close()

Closes a connection to the server if one has been established, allowing other clients to access the server.

create_graph()

Create a new graph associated with a new (non-default) unique graph ID, return the new graph ID.

delete_graph(graph_id)

Deletes the graph referenced by graph_id.

extract_subgraph([create_using, selection, ...])

Return a graph ID for a subgraph of the graph referenced by graph_id that containing vertices and edges that match a selection.

get_edge_IDs_for_vertices(src_vert_IDs, ...)

get_graph_edge_data([id_or_ids, ...])

Returns ...

get_graph_edge_property_names([graph_id])

Returns a list of the edge property names for the graph with the given graph id.

get_graph_edge_types([graph_id])

Returns a list of the edge type names for the graph with the given graph id.

get_graph_ids()

Returns a list of all graph IDs the server is currently maintaining.

get_graph_info([keys, graph_id])

Returns a dictionary containing meta-data about the graph referenced by graph_id (or the default graph if not specified).

get_graph_vertex_data([id_or_ids, ...])

Returns ...

get_graph_vertex_property_names([graph_id])

Returns a list of the vertex property names for the graph with the given graph id.

get_graph_vertex_types([graph_id])

Returns a list of the vertex type names for the graph with the given graph id.

get_num_edges([edge_type, graph_id])

Returns the number of edges in the graph with the given graph id.

get_num_vertices([vertex_type, ...])

Returns the number of vertices in the graph with the given graph id.

get_server_info()

Return a dictionary of information about the server.

graph()

Constructs a new RemoteGraph object wrapping a remote PropertyGraph.

is_edge_property(property_key[, graph_id])

Returns True if the given property key is for a valid vertex property in the given graph, false otherwise.e

is_vertex_property(property_key[, graph_id])

Returns True if the given property key is for a valid vertex property in the given graph, False otherwise.

load_csv_as_edge_data(csv_file_name, dtypes, ...)

Reads csv_file_name and applies it as edge data to the graph identified as graph_id (or the default graph if not specified).

load_csv_as_vertex_data(csv_file_name, ...)

Reads csv_file_name and applies it as vertex data to the graph identified as graph_id (or the default graph if not specified).

load_extensions(extension_dir_or_mod_path)

Loads the extensions present in the directory (path on disk), or module or package path (as used in an import statement) specified by extension_dir_or_mod_path.

load_graph_creation_extensions(...)

Loads the extensions for graph creation present in the directory specified by extension_dir_path.

node2vec(start_vertices, max_depth[, graph_id])

Computes random walks for each node in 'start_vertices', under the node2vec sampling framework.

open([call_timeout])

Opens a connection to the server at self.host/self.port if one is not already established.

pagerank([graph_id])

renumber_edges_by_type([prev_id_column, ...])

Renumbers the edges in the graph referenced by graph id to be contiguous by edge type.

renumber_vertices_by_type([prev_id_column, ...])

Renumbers the vertices in the graph referenced by graph id to be contiguous by vertex type.

uniform_neighbor_sample(start_list, fanout_vals)

Samples the graph and returns a UniformNeighborSampleResult instance.

unload_extension_module(modname)

Removes all extensions contained in the modname module.

uptime()

Return the server uptime in seconds.