Utility Endpoints¶
- class graphdatascience.procedure_surface.api.util_endpoints.UtilEndpoints¶
- abstract as_node(node_id: int) Node¶
Get a node from a node id.
- Parameters:
node_id (int) – The id of the node to get.
- Returns:
The node with the given id.
- Return type:
- abstract as_nodes(node_ids: list[int]) list[Node]¶
Get a list of nodes from a list of node ids.
- Parameters:
- Returns:
The nodes with the given ids.
- Return type:
- abstract find_node_id(labels: list[str] | None = None, properties: dict[str, Any] | None = None) int¶
Find the node id of a node with the given labels and properties.
Exactly one node must match the given labels and properties, otherwise an error is raised.
- abstract node_property(G: Graph, node_id: int, property_key: str, node_label: str = '*') Any¶
Get the property of a node with the given id from an in-memory graph.
Not available in AGA sessions; stream the node properties once (
gds.graph.node_properties.stream) and filter on the client side instead.