neo4j Match using neo4jrestclient


Example

from neo4jrestclient import client

q = 'MATCH (u:User)-[r:likes]->(m:language) WHERE u.name="Marco" RETURN u, type(r), m'

"db" as defined above

results = db.query(q, returns=(client.Node, str, client.Node))

Print results

for r in results:
print("(%s)-[%s]->(%s)" % (r[0]["name"], r[1], r[2]["name"]))

Output:

(Marco)-[likes]->(C++)
(Marco)-[likes]->(Python)