NetworkX - DiGraph

https://networkx.org/documentation/stable/reference/classes/digraph.html

DIRECTED GRAPHS

A directed graph (or digraph) is a graph that has directed edges (ordered pairs of vertices).


import networkx as nx

G = nx.DiGraph()   # a directed graph