networkx.shortest_path_length
networkx.single_source_shortest_path
Return list of nodes in a shortest path between source and target.
Return False if no path exists.
Also known as shortest_path.