A Relationship object stores the immutable pieces of that relationship, which are returned in the REST response. These are the start node, end node and type. The properties are mutable and a call to get_properties
will indeed (as you suggest) make a separate call to the server.
Side note: if you enable logging...
import logging
logging.basicConfig(level=logging.DEBUG)
...you should be able to see the traffic going to and fro.
You can however use a small trick to pick up a snapshot of the properties without a separate call. The __metadata__
attribute for any resource contains the last known details fetched from the server so the following should return the properties:
props = my_rel.__metadata__["data"]
With py2neo 1.6 (almost released!), the match
method has evolved slightly. Instead of fetching everything before returning it to you, it returns a generator and can be iterated over. So code such as...
for rel in graph_db.match("KNOWS"):
print rel.start_node["name"] + " knows " + rel.end_node["name"]
...will execute more quickly instead of waiting for the full response to be received.
EDIT ANSWER: Yes.
EDIT 2 ANSWER: That's a question for the Neo guys :-P