I was playing around with NetworkX, an excellent graph library for python. I wanted to upload the data I created to Neo4j. But I couldn’t find an easy way of doing this. So I created a library to move a NetworkX graph to Neo4j through two methods:
-
Convert a networkx graph to Geoff compatible string which could then be uploaded through a varity of ways.
-
Directly upload the graph using the Neo4j Batch REST API
To install:
To upload a graph to neo4j
I am assuming that all the properties of the nodes and edges are json encodeable. If not, you can easily pass a json encoder object to handle custom data types as mentioned here. Example here.
Comments/contributions welcome here!