関係に重みをつける方法[Py2neo][Neo4j]
from py2neo import Graph
from py2neo import Node, Relationship
user = 'neo4j'
pwd = 'neo4j'
graph = Graph(auth=(user, pwd)) #http://localhost:7474
tx = graph.begin()
a = Node("Person", name="Alice")
tx.create(a)
b = Node("Person", name="Bob")
tx.create(b)
ab = Relationship(a, "KNOWS", b, weight=10)
tx.create(ab)
tx.commit()





ディスカッション
コメント一覧
まだ、コメントがありません