I am using networkx package of Python.
Returns the shortest path from source to target in a weighted graph G.