Skip to content

Instantly share code, notes, and snippets.

@nicysneiros
Last active April 13, 2017 20:37
Show Gist options
  • Save nicysneiros/77e96ce3d060ae9dddba65254488a11a to your computer and use it in GitHub Desktop.
Save nicysneiros/77e96ce3d060ae9dddba65254488a11a to your computer and use it in GitHub Desktop.
from py2neo import Graph, Node, NodeSelector
g = Graph(password="admin")
selector = NodeSelector(g)
john = selector.select("User", name="John").first()
john_likes = g.match(start_node=john, rel_type="LIKES")
for like in john_likes:
page = like.end_node()
print(page)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment