Passing Neo4j SubGraph to Python


I want to pass subgraph from a cypher query to networkx, python. I am aware that there is py2neo, a python library that interacts with neo4j. However, I am unable to find a way to pass data from neo4j to networkx or other method to do some graph computation. Is there a way to do so?

If you want to use graph algorithms on your graph in Neo4j you can use neo4j-graph-algorithms. They are exposed as custom procedures and can be called directly with cypher. There is support for path-finding, centrality and community detection algorithms.