関係に重みをつける方法[Py2neo][Neo4j]
from py2neo import Graphfrom py2neo import Node, Relationshipuser = '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()