import networkx as nx
D = nx.DiGraph()
D.add_weighted_edges_from([('A', 'B', 0.5), ('A', 'C', 1)])
G = D.to_undirected()
print(nx.pagerank(G, max_iter=200))
{'A': 0.48648648872844047, 'C': 0.32567567418103965, 'B': 0.18783783709051982}
Textrank: complementing pagerank for sentence extraction using networkx