from py2neo import Node, Relationship, Graph (:Person {name:"Alice"}) (:Person {name:"Bob"}) (:Person {name:"Alice"})-[:KNOWS]->(:Person {name:"Bob"})