py2neo_graph= py2neo.Graph("http://****", user="****", password="*****") #3.5.3
def query_neo4j(query): results_generator = py2neo_graph.run(query) result_list=results_generator.data() return result_list
sub_list_q="""match (p5:Person)-[:Person_relation]->(p1:Person)-[:Person_relation]->(p4:Person) where id(p1)=63437252 return id(p1) as id_1,id(p4) as id_4,id(p5)as id_5 """
sub_list=query_neo4j(sub_list_q)
person_id=50312565
sub_list_q="""match(person:Person)-[:Intopiece_with_client_phone|Person_property]->(phone:Phone)where id(person)={person_id}RETURN phone"""results_generator=py2neo_graph.run(sub_list_q,{"person_id":person_id})result_list=results_generator.data()