Hello, Lucas.
There's nothing ready for this. Yet, it's not hard to write a function for this yourself. Here's an idea:
1. Call the shortest_path function with the desired graph and source node to retrieve the spanning tree (st):
>>> st, _ = shortest_path(gr, '1')
2. Follow the spanning tree from the target node to the source node. A possible solution:
>>> def path(st, target):
... if (target is None):
... return []
... else:
... return [target] + path(st, st[target])
...
>>> path(st, '3')
['3', '2', '1']
This gives you the path backwards, but you can easily call reverse on the list once it's done.