{"id":14959316,"url":"https://github.com/neo4j/graph-data-science-client","last_synced_at":"2025-10-07T00:45:49.319Z","repository":{"id":38255289,"uuid":"439278592","full_name":"neo4j/graph-data-science-client","owner":"neo4j","description":"A Python client for the Neo4j Graph Data Science (GDS) library","archived":false,"fork":false,"pushed_at":"2025-10-01T08:23:15.000Z","size":21572,"stargazers_count":224,"open_issues_count":30,"forks_count":55,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-10-01T10:26:15.057Z","etag":null,"topics":["algorithms","data-science","graph","graph-algorithms","graph-data-science","graph-database","graph-machine-learning","machine-learning","neo4j","python","python3"],"latest_commit_sha":null,"homepage":"https://neo4j.com/product/graph-data-science/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neo4j.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-17T09:30:10.000Z","updated_at":"2025-10-01T08:23:19.000Z","dependencies_parsed_at":"2023-10-03T17:52:11.271Z","dependency_job_id":"cca56c9f-10b2-479f-9576-35f8801972ad","html_url":"https://github.com/neo4j/graph-data-science-client","commit_stats":{"total_commits":2266,"total_committers":25,"mean_commits":90.64,"dds":0.7228596646072374,"last_synced_commit":"a4818c8ca93bc34ccd8dead468c8ded768b48954"},"previous_names":["neo4j/gdsclient"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/neo4j/graph-data-science-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j%2Fgraph-data-science-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j%2Fgraph-data-science-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j%2Fgraph-data-science-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j%2Fgraph-data-science-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neo4j","download_url":"https://codeload.github.com/neo4j/graph-data-science-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j%2Fgraph-data-science-client/sbom","scorecard":{"id":679493,"data":{"date":"2025-08-11","repo":{"name":"github.com/neo4j/graph-data-science-client","commit":"2638d308188db803db25d781ab06e313f7e48eed"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":5,"reason":"Found 3/6 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/neo4j/.github/SECURITY.md:1","Info: Found linked content: github.com/neo4j/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/neo4j/.github/SECURITY.md:1","Info: Found text in security policy: github.com/neo4j/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-2rxp-v6pw-ch6m","Warn: Project is vulnerable to: GHSA-4xqq-m2hx-25v8","Warn: Project is vulnerable to: GHSA-5866-49gr-22v4","Warn: Project is vulnerable to: GHSA-r55c-59qm-vjw6","Warn: Project is vulnerable to: GHSA-vmwr-mc7x-5vc3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: npmCommand not pinned by hash: scripts/render_docs.sh:4","Warn: npmCommand not pinned by hash: scripts/render_docs.sh:5","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}}]},"last_synced_at":"2025-08-21T22:37:26.476Z","repository_id":38255289,"created_at":"2025-08-21T22:37:26.477Z","updated_at":"2025-08-21T22:37:26.477Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278703585,"owners_count":26031205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-science","graph","graph-algorithms","graph-data-science","graph-database","graph-machine-learning","machine-learning","neo4j","python","python3"],"created_at":"2024-09-24T13:19:26.717Z","updated_at":"2025-10-07T00:45:49.295Z","avatar_url":"https://github.com/neo4j.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neo4j Graph Data Science Client\n\n[![Latest version](https://img.shields.io/pypi/v/graphdatascience)](https://pypi.org/project/graphdatascience/)\n[![PyPI downloads month](https://img.shields.io/pypi/dm/graphdatascience)](https://pypi.org/project/graphdatascience/)\n![Python versions](https://img.shields.io/pypi/pyversions/graphdatascience)\n[![Documentation](https://img.shields.io/badge/Documentation-latest-blue)](https://neo4j.com/docs/graph-data-science-client/current/)\n[![Discord](https://img.shields.io/discord/787399249741479977?label=Chat\u0026logo=discord)](https://discord.gg/neo4j)\n[![Community forum](https://img.shields.io/website?down_color=lightgrey\u0026down_message=offline\u0026label=Forums\u0026logo=discourse\u0026up_color=green\u0026up_message=online\u0026url=https%3A%2F%2Fcommunity.neo4j.com%2F)](https://community.neo4j.com)\n[![License](https://img.shields.io/pypi/l/graphdatascience)](https://www.apache.org/licenses/LICENSE-2.0)\n\n`graphdatascience` is a Python client for operating and working with the [Neo4j Graph Data Science (GDS) library](https://github.com/neo4j/graph-data-science).\nIt enables users to write pure Python code to project graphs, run algorithms, as well as define and use machine learning pipelines in GDS.\n\nThe API is designed to mimic the GDS Cypher procedure API in Python code.\nIt abstracts the necessary operations of the [Neo4j Python driver](https://neo4j.com/docs/python-manual/current/) to offer a simpler surface.\nAdditionally, 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.\n\n`graphdatascience` is only guaranteed to work with GDS versions 2.0+.\n\nPlease leave any feedback as issues on [the source repository](https://github.com/neo4j/graph-data-science-client).\nHappy coding!\n\n\n## Installation\n\nTo install the latest deployed version of `graphdatascience`, simply run:\n\n```bash\npip install graphdatascience\n```\n\n\n## Getting started\n\nTo use the GDS Python Client, we need to instantiate a GraphDataScience object.\nThen, we can project graphs, create pipelines, train models, and run algorithms.\n\n```python\nfrom graphdatascience import GraphDataScience\n\n# Configure the driver with AuraDS-recommended settings\ngds = GraphDataScience(\"neo4j+s://my-aura-ds.databases.neo4j.io:7687\", auth=(\"neo4j\", \"my-password\"), aura_ds=True)\n\n# Import the Cora common dataset to GDS\nG = gds.graph.load_cora()\nassert G.node_count() == 2708\n\n# Run PageRank in mutate mode on G\npagerank_result = gds.pageRank.mutate(G, tolerance=0.5, mutateProperty=\"pagerank\")\nassert pagerank_result[\"nodePropertiesWritten\"] == G.node_count()\n\n# Create a Node Classification pipeline\npipeline = gds.nc_pipe(\"myPipe\")\nassert pipeline.type() == \"Node classification training pipeline\"\n\n# Add a Degree Centrality feature to the pipeline\npipeline.addNodeProperty(\"degree\", mutateProperty=\"rank\")\npipeline.selectFeatures(\"rank\")\nfeatures = pipeline.feature_properties()\nassert len(features) == 1\nassert features[0][\"feature\"] == \"rank\"\n\n# Add a training method\npipeline.addLogisticRegression(penalty=(0.1, 2))\n\n# Train a model on G\nmodel, train_result = pipeline.train(G, modelName=\"myModel\", targetProperty=\"myClass\", metrics=[\"ACCURACY\"])\nassert model.metrics()[\"ACCURACY\"][\"test\"] \u003e 0\nassert train_result[\"trainMillis\"] \u003e= 0\n\n# Compute predictions in stream mode\npredictions = model.predict_stream(G)\nassert len(predictions) == G.node_count()\n```\n\nThe example here assumes using an AuraDS instance.\nFor additional examples and extensive documentation of all capabilities, please refer to the [GDS Python Client Manual](https://neo4j.com/docs/graph-data-science-client/current/).\n\nFull end-to-end examples in Jupyter ready-to-run notebooks can be found in the [`examples` source directory](https://github.com/neo4j/graph-data-science-client/tree/main/examples):\n\n* [Machine learning pipelines: Node classification](examples/ml-pipelines-node-classification.ipynb)\n* [Node Regression with Subgraph and Graph Sample projections](examples/node-regression-with-subgraph-and-graph-sample.ipynb)\n* [Product recommendations with kNN based on FastRP embeddings](examples/fastrp-and-knn.ipynb)\n* [Sampling, Export and Integration with PyG example](examples/import-sample-export-gnn.ipynb)\n* [Load data to a projected graph via graph construction](examples/load-data-via-graph-construction.ipynb)\n* [Heterogeneous Node Classification with HashGNN and Autotuning](https://github.com/neo4j/graph-data-science-client/tree/main/examples/heterogeneous-node-classification-with-hashgnn.ipynb)\n* [Perform inference using pre-trained KGE models](examples/kge-predict-transe-pyg-train.ipynb)\n\n\n## Documentation\n\nThe primary source for learning everything about the GDS Python Client is the manual, hosted at https://neo4j.com/docs/graph-data-science-client/current/.\nThe manual is versioned to cover all GDS Python Client versions, so make sure to use the correct version to get the correct information.\n\n\n## Known limitations\n\nOperations known to not yet work with `graphdatascience`:\n\n* [Numeric utility functions](https://neo4j.com/docs/graph-data-science/current/management-ops/utility-functions/#utility-functions-numeric) (will never be supported)\n\n\n## License\n\n`graphdatascience` is licensed under the Apache Software License version 2.0.\nAll content is copyright © Neo4j Sweden AB.\n\n\n## Acknowledgements\n\nThis work has been inspired by the great work done in the following libraries:\n\n* [pygds](https://github.com/stellasia/pygds) by stellasia\n* [gds-python](https://github.com/moxious/gds-python) by moxious\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo4j%2Fgraph-data-science-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneo4j%2Fgraph-data-science-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo4j%2Fgraph-data-science-client/lists"}