graspologic-native
What it is and what it does
graspologic-native is a compiled Python extension that implements the Leiden community detection algorithm in Rust for use in graph analysis workflows. The Leiden algorithm identifies clusters or communities within network structures, and this package provides a high-performance native implementation rather than a pure-Python one. It is built using PyO3 and maturin, and depends only on numpy and scipy.
The package is designed to serve as a performance-critical component, likely integrated into the broader graspologic graph statistics library. It targets Python 3.9 and later on 64-bit systems, with prebuilt wheels for common platforms (Linux, macOS, Windows on x86_64 and aarch64). If prebuilt wheels don't match your platform, you can build from source using Rust and uv.
Use it for:
- Detect communities or clusters in large network graphs as part of graph analysis pipelines
- Accelerate community detection workloads where pure-Python implementations are too slow
- Integrate high-performance Leiden clustering into graspologic-based research or production systems
- Analyze social networks, biological networks, or other graph structures for structural patterns
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a high-performance Rust implementation of the Leiden community detection algorithm for graph analysis, exposed to Python via a native extension module.
Yes, if you need fast community detection for graph analysis and are using Python 3.9+. The package is actively maintained, has no known vulnerabilities, and offers prebuilt wheels for most platforms. Install friction is moderate but manageable; if your platform lacks a prebuilt wheel, building from source requires Rust and uv. Best suited as a dependency of graspologic rather than standalone use.
Install
graspologic-native on PyPI
pip
pip install graspologic-nativeuv
uv add graspologic-nativepoetry
poetry add graspologic-nativeInstalling graspologic-native
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9–3.13 on x86_64 and aarch64 across Linux, macOS (universal2), and Windows. Actively maintained with recent release (61 days ago) and no known vulnerabilities.
License in practice
MIT license (permissive); you can use, modify, and distribute this package with minimal restrictions, including in commercial projects.
Quickstart
pip install graspologic-native
import graspologic_native
# Use Leiden algorithm via graspologic package integration
Requires Python 3.9 or later and a 64-bit operating system; prebuilt wheels available for common platforms, but source builds require Rust stable and uv.
Verify before relying
- Exact API surface and function signatures for the Leiden implementation exposed to Python
- Performance benchmarks or typical speedup vs. pure-Python alternatives
- Whether this package is intended for standalone use or primarily as a dependency of graspologic
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — numpy, scipy |
| Maintenance | actively maintained — 61 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 220,291/month — #9,306 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: graspologic_native-1.3.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; graspologic_native-1.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; graspologic_native-1.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; graspologic_native-1.3.1-cp39-abi3-musllinux_1_2_aarch64.whl; graspologic_native-1.3.1-cp39-abi3-musllinux_1_2_x86_64.whl; graspologic_native-1.3.1-cp39-abi3-win_amd64.whl; graspologic_native-1.3.1-cp39-abi3-win_arm64.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
graspologicGraspologic provides graph statistical…
permissive · top 15,000 on PyPI
leidenalgImplements the Leiden community detection…
copyleft · top 15,000 on PyPI
moviepilot-rustProvides Rust-accelerated parsing and filtering…
unclear · top 15,000 on PyPI
rustworkxA high-performance graph library for Python,…
permissive · top 5,000 on PyPI
retworkxA deprecated package name for rustworkx, a…
permissive · top 15,000 on PyPI
pyoxigraphPyoxigraph is a Python library that provides…
permissive · top 15,000 on PyPI
phonorsPhonors provides Rust-accelerated numerical…
permissive · top 15,000 on PyPI
kornia-rskornia-rs provides low-level computer vision…
permissive · top 5,000 on PyPI
cityseerComputes network centrality, land-use…
agpl · top 15,000 on PyPI
delta-kernel-rust-sharing-wrapperProvides Python bindings to the Rust-based…
permissive · top 5,000 on PyPI