Interface between networkx and igraph

I’ve been working with networkx for quite some time now and it’s been serving my purposes quite well with minimal tweaks until recently when I started looking into community detection. In comparison, the igraph Python package seems to have a much wider implementations of community detection methods (even compared to networkx with Thomas Aynaud’s community package added on). I’m just wondering if there’s any existing, tested API that would allow easy translation of a networkx graph into the igraph structure, so I can avail myself of the power igraph provides in this area?

Your kind answers are highly appreciated.

Answer

Networkx and python-igraph both support a wide range of read/write algorithms (networkx, python-igraph).

At least two formats (GML and pajek) appear to be common between the two, although I haven’t tried this.