Skip to content

Instantly share code, notes, and snippets.

@mklymyshyn
Created December 7, 2013 10:16
Show Gist options
  • Save mklymyshyn/7839352 to your computer and use it in GitHub Desktop.
Save mklymyshyn/7839352 to your computer and use it in GitHub Desktop.
from py2neo import neo4j, node
graph_db = neo4j.GraphDatabaseService(
"http://localhost:7474/db/data/")
alice, bob, carol = node(name="Alice"), \
node(name="Bob"), \
node(name="Carol")
abc = neo4j.Path(
alice, "KNOWS", bob, "KNOWS", carol)
abc.create(graph_db)
print(abc.nodes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment