pip install py2neo python from py2neo import Graph graph = Graph("bolt://localhost:7687", auth=("neo4j", "password")) python node = graph.nodes.create(name="Alice", age=30) python node["gender"] = "female" node["occupation"] = "engineer" node.push() python node1 = graph.nodes.match("name", "Alice").first() node2 = graph.nodes.match("name", "Bob").first() relationship = graph.create(node1, "FRIENDS_WITH", node2)


上一篇:
下一篇:
切换中文