返回 Skill 列表
extension
分类: 其它无需 API Key

Graph DB Toolkit

Neo4j图数据库工具包,基于Cypher进行图分析。适用于知识图谱、关系查询、图遍历和Neo4j操作等场景。

person作者: kaiyuelvhubclawhub

Graph Database Toolkit

Operations toolkit for graph databases with focus on Neo4j and Cypher.

Quick Start

from scripts.neo4j_client import Neo4jClient

client = Neo4jClient(uri="bolt://localhost:7687", user="neo4j", password="password")
client.create_node("Person", {"name": "Alice", "age": 30})
client.create_node("Person", {"name": "Bob", "age": 25})
client.create_relationship("Alice", "Person", "KNOWS", "Bob", "Person", {"since": 2020})
results = client.query("""
    MATCH (a:Person)-[r:KNOWS]->(b:Person)
    RETURN a.name, b.name, r.since
""")

Scripts

  • scripts/neo4j_client.py - Neo4j connection and CRUD operations
  • scripts/cypher_builder.py - Cypher query builder utilities
  • scripts/graph_analytics.py - Graph algorithms (centrality, paths, community)

References

  • references/cypher_cheatsheet.md - Common Cypher patterns
  • references/neo4j_patterns.md - Neo4j design patterns