Thanks to everyone for their answers. I perhaps should not have
complicated the post by mentioning the K-shortest paths algorithm.
Aric actually pointed out the exact algorithm I have used in the past
(i.e. the one from David Eppstein). The basis for this algorithm is to
find the first shortest path and then based on this find the next
shortest path. I have implemented it in the past in C++ and made use
of Dijkstra's shortest path algorithm as the basis. My Dijkstra
algorithm implementation supported returning the edge list for the
path instead of the node list. And of course, since you know the end
points of the edges, you can easily produce the node list too.
I had a look at the single_source_dijkstra() function and with quite
an easy adaptation I can get what I want. Instead of storing nodes in
the path I would just store edges. Then I would return the list of
edges. Then I would just implement David Eppstein's k-shortest paths
algorithm. I didn't understand the comment about the algorithm not
being implemented multigraphs because it slows down the algorithm too
much. As if you look at the special case where a Multigraph is equal
to Graph (i.e. only one edge) the two implementations perform the
same. I agree that having Multigraph requires more work to find the
shortest path as you then have more neighbors to investigate.
I also may investigate the Boost Graph Library and its Python
bindings. As I think that all the BGL algorithms are adapted for
Multigraphs. But I will have to validate this.