Graph

class graphdatascience.graph.graph_api.Graph

A graph object that represents a graph in the graph catalog. It can be passed into algorithm endpoints to compute over the corresponding graph. It contains summary information about the graph.

configuration() → dict[str, Any]
Returns:

the configuration of the graph

Return type:

dict[str, Any]

creation_time() → datetime
Returns:

the creation time of the graph

Return type:

datetime

degree_distribution() → dict[str, float | int]
Returns:

the degree distribution of the graph

Return type:

dict[str, float | int]

density() → float
Returns:

the density of the graph

Return type:

float

drop(fail_if_missing: bool = True) → GraphInfo | None
Parameters:

fail_if_missing (bool) – whether to fail if the graph does not exist

Returns:

the result of the drop operation

Return type:

GraphInfo | None

exists() → bool
Returns:

whether the graph exists

Return type:

bool

memory_usage() → str | None
Returns:

the memory usage of the graph

Return type:

str | None

modification_time() → datetime
Returns:

the modification time of the graph

Return type:

datetime

name() → str
Returns:

name of the graph

Return type:

str

node_count() → int
Returns:

the number of nodes in the graph

Return type:

int

node_labels() → list[str]
Returns:

the node labels in the graph

Return type:

list[str]

node_properties() → dict[str, list[str]]
Returns:

the node properties per node label

Return type:

dict[str, list[str]]

relationship_count() → int
Returns:

the number of relationships in the graph

Return type:

int

relationship_properties() → dict[str, list[str]]
Returns:

the relationship properties per relationship type

Return type:

dict[str, list[str]]

relationship_types() → list[str]
Returns:

the relationship types in the graph

Return type:

list[str]

size_in_bytes() → int
Returns:

the size of the graph in bytes

Return type:

int

class graphdatascience.graph.graph_info.GraphInfo
class graphdatascience.graph.graph_info.GraphInfoWithDegrees