AuraGraphDataScience¶
- class graphdatascience.session.AuraGraphDataScience¶
Primary API class for interacting with Neo4j database + Graph Data Science Session. Always bind this object to a variable called gds.
- property all_shortest_paths: AllShortestPathEndpoints¶
Return endpoints for the all shortest paths algorithm.
- arrow_client() GdsArrowClient¶
Returns a GdsArrowClient that is authenticated to communicate with the Aura Graph Analytics Session. This client can be used to get direct access to the specific session’s Arrow Flight server.
- Returns:
GdsArrowClient – A GdsArrowClient
——-
- Return type:
- property article_rank: ArticleRankEndpoints¶
Return endpoints for the article rank algorithm.
- property articulation_points: ArticulationPointsEndpoints¶
Return endpoints for the articulation points algorithm.
- property bellman_ford: SingleSourceBellmanFordEndpoints¶
Return endpoints for the single source Bellman-Ford algorithm.
- property betweenness: BetweennessEndpoints¶
Return endpoints for the betweenness centrality algorithm.
- property betweenness_centrality: BetweennessEndpoints¶
Return endpoints for the betweenness centrality algorithm.
- property bfs: BFSEndpoints¶
Return endpoints for the Breadth First Search (BFS) algorithm.
- bookmarks() Bookmarks | None¶
Get the Neo4j bookmarks defining the currently required states for cypher queries to execute
- Returns:
The Neo4j bookmarks defining the currently required state.
- Return type:
neo4j.Bookmarks | None
- property bridges: BridgesEndpoints¶
Return endpoints for the bridges algorithm.
- property clique_counting: CliqueCountingEndpoints¶
Return endpoints for the clique counting algorithm.
- close() None¶
Close the GraphDataScience object and release any resources held by it.
- Return type:
None
- property closeness: ClosenessEndpoints¶
Return endpoints for the closeness centrality algorithm.
- property closeness_centrality: ClosenessEndpoints¶
Return endpoints for the closeness centrality algorithm.
- property collapse_path: CollapsePathEndpoints¶
Return endpoints for collapsing relationship paths.
- property conductance: ConductanceEndpoints¶
Return endpoints for the conductance algorithm.
- property config: ConfigEndpoints¶
Return configuration-related endpoints.
- property dag: DagEndpoints¶
Return endpoints for Directed Acyclic Graph (DAG) algorithms.
- database() str | None¶
Get the database which cypher queries are run against.
- Returns:
The name of the database.
- Return type:
str | None
- db_driver() Driver¶
Get the Neo4j driver used by this client to communicate with the Neo4j DBMS.
This is mainly useful when the run_cypher() API is too simple for a use case, as the driver allows full control over sessions and transactions.
The driver is always created and managed by this client, and closed by close(), after which it is unusable.
- Returns:
The Neo4j driver used by this client.
- Return type:
- property degree: DegreeEndpoints¶
Return endpoints for the degree centrality algorithm.
- property degree_centrality: DegreeEndpoints¶
Return endpoints for the degree centrality algorithm.
- property dfs: DFSEndpoints¶
Return endpoints for the Depth First Search (DFS) algorithm.
- property eigenvector: EigenvectorEndpoints¶
Return endpoints for the eigenvector centrality algorithm.
- property eigenvector_centrality: EigenvectorEndpoints¶
Return endpoints for the eigenvector centrality algorithm.
- property embedding: EmbeddingEndpoints¶
Return endpoints for embedding train, predict, and encode procedures.
- property fast_path: FastPathEndpoints¶
Return endpoints for the FastPath algorithm.
- property fast_rp: FastRPEndpoints¶
Return endpoints for the fast RP algorithm.
- property graph: CatalogArrowEndpoints¶
Return graph-related endpoints for graph management.
- property graph_sage: GraphSageSessionEndpoints¶
Return endpoints for the GraphSage algorithm.
- property harmonic: ClosenessHarmonicEndpoints¶
Return endpoints for the harmonic centrality algorithm.
- property harmonic_centrality: ClosenessHarmonicEndpoints¶
Return endpoints for the harmonic centrality algorithm.
- property hash_gnn: HashGNNEndpoints¶
Return endpoints for the HashGNN algorithm.
- property hdbscan: HdbscanEndpoints¶
Return endpoints for the HDBSCAN algorithm.
- property hits: HitsEndpoints¶
Return endpoints for the HITS algorithm.
- property influence_maximization_celf: CelfEndpoints¶
Return endpoints for the influence maximization CELF algorithm.
- property jobs: JobsArrowEndpoints¶
Return endpoints for inspecting and controlling jobs (get/list).
- property k1_coloring: K1ColoringEndpoints¶
Return endpoints for the K1 coloring algorithm.
- property k_core_decomposition: KCoreEndpoints¶
Return endpoints for the K-core decomposition algorithm.
- property k_spanning_tree: KSpanningTreeEndpoints¶
Return endpoints for the K-spanning tree algorithm.
- property kcore: KCoreEndpoints¶
Return endpoints for the K-core decomposition algorithm.
- property kmeans: KMeansEndpoints¶
Return endpoints for the K-means algorithm.
- property knn: KnnEndpoints¶
Return endpoints for the K-nearest neighbors algorithm.
- property label_propagation: LabelPropagationEndpoints¶
Return endpoints for the label propagation algorithm.
- last_bookmarks() Bookmarks | None¶
Get the Neo4j bookmarks defining the state following the most recently called query
- Returns:
The Neo4j bookmarks defining the state following the most recently called query.
- Return type:
neo4j.Bookmarks | None
- property leiden: LeidenEndpoints¶
Return endpoints for the Leiden algorithm.
- property list_progress: ListProgressEndpoint¶
Return system-related endpoints.
- property local_clustering_coefficient: LocalClusteringCoefficientEndpoints¶
Return endpoints for the local clustering coefficient algorithm.
- property louvain: LouvainEndpoints¶
Return endpoints for the Louvain algorithm.
- property max_flow: MaxFlowEndpoints¶
Return endpoints for the Max Flow algorithm.
- property max_k_cut: MaxKCutEndpoints¶
Return endpoints for the Max K-cut algorithm.
- property model: ModelCatalogEndpoints¶
Return model-related endpoints for model management.
- property modularity: ModularityEndpoints¶
Return endpoints for the modularity algorithm.
- property modularity_optimization: ModularityOptimizationEndpoints¶
Return endpoints for the modularity optimization algorithm.
- property node2vec: Node2VecEndpoints¶
Return endpoints for the Node2Vec algorithm.
- property node_similarity: NodeSimilarityEndpoints¶
Return endpoints for the node similarity algorithm.
- property page_rank: PageRankEndpoints¶
Return endpoints for the PageRank algorithm.
- property pipeline: PipelineEndpoints¶
Return endpoints for pipeline procedures.
- property prize_steiner_tree: PrizeSteinerTreeEndpoints¶
Return endpoints for the prize-collecting Steiner tree algorithm.
- property random_walk: RandomWalkEndpoints¶
Return endpoints for the Random Walk algorithm.
- run_cypher(query: str, params: dict[str, Any] | None = None, database: str | None = None, mode: QueryMode | Literal['READ', 'WRITE'] = QueryMode.WRITE, auto_commit: bool = False) DataFrame¶
Run a Cypher query against the Neo4j database.
- Parameters:
query (str) – the Cypher query
database (str) – the database on which to run the query
mode (QueryMode | Literal['READ', 'WRITE']) – the query mode to use. Set based on the operation performed in the query.
auto_commit (bool) – run the query in an auto-commit transaction. This is required for queries using CALL { … } IN TRANSACTIONS.
- Returns:
The query result as a DataFrame
- Return type:
- property scale_properties: ScalePropertiesEndpoints¶
Return endpoints for scaling node properties.
- property scc: SccEndpoints¶
Return endpoints for the strongly connected components algorithm.
- set_bookmarks(bookmarks: Bookmarks | None) None¶
Set Neo4j bookmarks to require a certain state before the next query gets executed
- Parameters:
bookmarks (neo4j.Bookmarks | None) – The Neo4j bookmarks defining the required state
- Return type:
None
- set_database(database: str) None¶
Set the database which cypher queries are run against.
- Parameters:
database (str) – The name of the database to run queries against.
- Return type:
None
- set_show_progress(show_progress: bool) None¶
Set whether to show progress for running procedures.
- Parameters:
show_progress (bool) – Whether to show progress for procedures.
- Return type:
None
- property shortest_path: ShortestPathEndpoints¶
Return endpoints for the shortest path algorithm.
- property similarity: SimilarityFunctions¶
Return similarity functions computed client-side.
- property sllpa: SllpaEndpoints¶
Return endpoints for the speaker-listener label propagation algorithm.
- property spanning_tree: SpanningTreeEndpoints¶
Return endpoints for the spanning tree algorithm.
- property steiner_tree: SteinerTreeEndpoints¶
Return endpoints for the Steiner tree algorithm.
- property topological_link_prediction: TopologicalLinkPredictionEndpoints¶
Return endpoints for topological link prediction functions.
The functions are evaluated via the Cypher surface of the AuraDB the session is attached to. They are not available in standalone sessions, or when the session is not attached to an AuraDB.
- property triangle_count: TriangleCountEndpoints¶
Return endpoints for the triangle count algorithm.
- property triangles: TrianglesEndpoints¶
Return endpoint for the triangles algorithm.
- property util: UtilEndpoints¶
Return utility endpoints.
- verify_connectivity() None¶
Verifies that Aura Graph Analytics Session is ready and the connection to the Aura Graph Analytics Session can be established. Also verifies the connection to the Neo4j database, if specified.
- Raises:
Exception – if the session is not running anymore, the session cannot be reached or the database driver cannot connect to the remote.
- Return type:
None
- property wcc: WccEndpoints¶
Return endpoints for the weakly connected components algorithm.
- class graphdatascience.session.aura_api_responses.SessionErrorData¶
Represents information about a session errors. Indicates that session is in Failed state.