
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
graphrs-python
Advanced tools
graphrs_python is a Python wrapper around the high-performance graphrs
Rust crate. See the performance documentation
for a comparison of the performance of graphrs to other graph libraries.
import graphrs_python as grs
nodes = ["n1", "n2", "n3", "n4"]
edges = [("n1", "n2", 1.0), ("n2", "n3", 1.0), ("n3", "n4", 1.0), ("n4", "n2", 1.0)]
graph = grs.create_graph_from_nodes_and_edges(nodes, edges, directed=True)
print(grs.betweenness_centrality(graph, weighted=True, normalized=True))
print(grs.closeness_centrality(graph, weighted=True, wf_improved=True))
print(grs.eigenvector_centrality(graph, weighted=True))
Graphs can also be created from just edges:
import graphrs_python as grs
edges = [("n1", "n2", 1.0), ("n2", "n3", 1.0), ("n3", "n4", 1.0), ("n4", "n2", 1.0)]
graph = grs.create_graph_from_edges(edges, directed=True)
And graphs can also be created from NetworkX Graph objects:
import graphrs_python as grs
import networkx
graph = nx.DiGraph()
graph.add_edges_from(
[
("n1", "n2", {"weight": 1.0}),
("n2", "n3", {"weight": 1.0}),
("n3", "n4", {"weight": 1.0}),
("n4", "n2", {"weight": 1.0}),
]
)
graph = grs.create_graph_from_networkx(graph, weight="weight")
MIT
FAQs
A Python module that wraps the high-performance `graphrs` Rust library.
We found that graphrs-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.