Graphviz graph to horizontal

Solution 1:

try:

dot = Digraph(graph_attr={'rankdir':'LR'})