Neo4j Graph Data Science Python Client

To help users of Neo4j Graph Data Science who work with Python as their primary language and environment, we offer the official Graph Data Science (GDS) Python Client package called graphdatascience. It enables users to write pure Python code to project graphs, run algorithms, use machine learning pipelines, and train machine learning models with GDS. To avoid naming confusion with the server-side GDS library, we will here refer to the Neo4j Graph Data Science client as the Python client.

The Python client API is designed to mimic the GDS Cypher procedure API in Python code. It wraps and abstracts the necessary operations of the Neo4j Python driver to offer a simpler surface. For a high level explanation of how the Cypher API maps to the Python client API please see Mapping between Cypher and Python.

Additionally, the client-specific graph, model, and pipeline objects offer convenient functions that heavily reduce the need to use Cypher to access and operate these GDS resources.

The source code of the GDS Python client is available at GitHub. If you have a suggestion on how we can improve the library or want to report a problem, you can create a new issue.

© 2023