PyGraphina provides Python bindings for Graphina.
Important
PyGraphina is in early development, so breaking changes and bugs are expected. Please report bugs on GitHub issues.
pip install pygraphinaimport pygraphina as pg
# Create a graph
g = pg.PyGraph()
a, b, c = [g.add_node(i) for i in range(3)]
g.add_edge(a, b, 1.0)
g.add_edge(b, c, 1.0)
# Calculate PageRank
pr = pg.centrality.pagerank(g, 0.85, 100, 1e-6)
# Find largest clique size
size = pg.approximation.large_clique_size(g)
# Find connected components
comps = pg.community.connected_components(g)
# Compute Jaccard coefficients
jc = pg.links.jaccard_coefficient(g)
print(f"PageRank: {pr}")
print(f"Clique size: {size}")
print(f"Connected components: {comps}")
print(f"Jaccard coefficients: {jc}")Visit PyGraphina's documentation page for detailed information including examples and API references.
PyGraphina is licensed under the MIT License.