im in search of something of that :
rels = node1.relationships.node2.<direction>
but dunno if this is done with traversal in more simple manner ..
There is no way to do that in the neo4jrestclient, but you can use the
script Nigel has written also in the library:
>>> gremlin = gdb.extensions.GremlinPlugin.execute_script
>>> relationships = gremlin(script=script)
Or just returning the data as raw:
>>> relationships = gremlin(script=script, returns=client.constants.RAW)
Another less efficient way is just a comprehesion list like this one:
>>> [r for r in n2.relationships.all(type=["KNOWS"]).all() if n2 in [r.start, r.end]]
It returns all the relationships of types "KNOWS" between n1 and n2,
no matters the direction. Or you can even use traversals.
--
Javier de la Rosa
http://versae.es