graspologic
A set of Python modules for graph statistics
What it is and what it does
Graspologic is a Python library for statistical analysis of graphs and networks. It provides algorithms and utilities designed to work with the spatial structure of networks, applying specialized statistical techniques rather than treating graph data as unstructured. The package includes methods for graph embedding, clustering, hypothesis testing, and other analyses that respect the relational structure inherent in network data.
The library depends on a mature scientific Python stack (numpy, scipy, scikit-learn, networkx, matplotlib, seaborn) and is actively maintained with support for Python 3.9 through 3.12. It is intended for researchers and practitioners working with network data in domains like social networks, biological networks, or any domain where relationships between entities matter. The package is production-stable and has been in active development since 2020.
Use it for:
- Embed graph structures into low-dimensional vector spaces for downstream machine learning tasks.
- Test statistical hypotheses about network structure, connectivity, or community organization.
- Cluster nodes or detect communities within networks using graph-aware algorithms.
- Analyze and compare multiple networks to identify structural differences or similarities.
- Preprocess and visualize network data for exploratory analysis or publication.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Graspologic provides graph statistical algorithms and utilities for processing, analyzing, and modeling networks using specialized statistical techniques that account for graph structure.
Yes. Graspologic is a mature, actively maintained library with no known vulnerabilities, permissive licensing, and low installation friction. It is well-suited for anyone working with network or graph data who needs statistical algorithms beyond basic graph operations. The dependency footprint is substantial but standard in scientific Python; if you already use scikit-learn and scipy, adding graspologic is straightforward.
Install
graspologic on PyPI
pip
pip install graspologicuv
uv add graspologicpoetry
poetry add graspologicInstalling graspologic
Before you install
Low friction installation with a pure-Python wheel. Active maintenance with a recent release (340 days ago) and ongoing repository activity. Depends on 17 runtime packages including heavy scientific libraries (scikit-learn, scipy, networkx, gensim), which are standard in the data science ecosystem.
License in practice
MIT license is permissive—you can use, modify, and distribute graspologic freely in commercial and private projects with minimal restrictions, only requiring license attribution.
Quickstart
pip install graspologic
import graspologic
from graspologic.embed import AdjacencySpectralEmbed
# Embed a graph adjacency matrix
embedder = AdjacencySpectralEmbed()
embedding = embedder.fit_transform(adjacency_matrix)
Requires Python 3.9–3.12 (x86_64 architecture on Linux, macOS, or Windows 10); tested on these platforms only.
Verify before relying
- Whether the package's graph algorithms scale well to very large networks or if there are documented size/performance limits.
- Whether the embedding and clustering methods are suitable for directed, weighted, or temporal graphs specifically.
- Performance characteristics when working with sparse versus dense adjacency matrices.
Package facts
| License | MIT (permissive) |
| Python support | capped below the current Python release (<3.13,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 17 — POT, anytree, beartype, future, gensim, graspologic-native, hyppo, joblib, matplotlib, networkx, numpy, scikit-learn, scipy, seaborn, statsmodels, typing-extensions, umap-learn |
| Maintenance | actively maintained — 340 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 148,154/month — #11,043 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: graspologic-3.4.4-py3-none-any.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
graspologic-nativeProvides a high-performance Rust implementation…
permissive · top 15,000 on PyPI
scikit-networkscikit-network provides graph algorithms and…
permissive · top 5,000 on PyPI
grandalfGrandalf computes node coordinates and routes…
copyleft · top 5,000 on PyPI
pointpatsPointpats provides statistical methods for…
permissive · top 15,000 on PyPI
krippendorffComputes Krippendorff's alpha, a statistical…
copyleft · top 15,000 on PyPI
graphframesGraphFrames provides distributed graph…
permissive · top 5,000 on PyPI
cityseerComputes network centrality, land-use…
agpl · top 15,000 on PyPI
python-igraphPython interface to the igraph graph library…
copyleft · top 15,000 on PyPI
igraphigraph provides a Python interface to a…
copyleft · top 5,000 on PyPI