I'm looking for a Python network analysis library which can connect to a database to access the nodes, edges and attributes of a large graph.

So far I've been using NetworkX (which is great) but I'm now working with larger graphs (e.g. 10 million nodes). When the data is saved in a text file, it takes a long time for NetworkX to read a ~1GB file into memory in order to analyse it. I thought a library which connects to a database (e.g. something like SQLite) rather than reading in a whole file could be faster.

The main analysis functions I need are route-finding ones e.g. Dijkstra's algorithm. I don't need graph visualisation functions.

Ideally I'm looking for a db I could host myself as a service or a file on disk (as SQLite).

So far I've looked at:

  • NetworkX - doesn't connect to a db
  • Graphlite - looks promising but doesn't provide built-in route-finding
  • Neo4J - possibly the best option...?
  • iGraph - doesn't connect to a db
  • Graph-tool - doesn't connect to a db

Can anyone recommend a particular library and database?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.