API reference

The main entry point is run(), which returns an immutable Result. Build inputs with Network, capture configuration with Options, and convert results to graph objects with to_networkx() and to_igraph(). The stateful Infomap class composes these for incremental, repeated-run workflows.

Top-level functions

run(), the graph-package helpers find_communities() and find_igraph_communities(), and information-theoretic primitives.

Network

Network, the first-class input builder.

Result

Result, the immutable run snapshot, and TreeNode.

Options and multilayer inputs

Options for reusable configuration and MultilayerNode for multilayer link inputs.

Export helpers

to_networkx() / to_igraph() and the GraphML / GEXF writers.

Infomap class

The stateful Infomap class with all configuration and run methods; new code usually wants run() instead.

Tree nodes and iterators

InfoNode and the tree-walking iterators returned by Result.tree(), Result.leaf_modules(), and friends.

Errors

InfomapError and its subclasses – the exception types every engine failure is raised as.

Integrations

Scanpy (infomap.tl.infomap()), GraphRAG, and the distributed-trial merge tool.

Datasets

The bundled example networks, one loader per network (infomap.datasets.two_triangles() and friends).

Deprecation policy

The deprecation contract: signature tiers, the 2.15 → 3.0 timeline, and the compatibility aliases.