skillfed

graspologic-native

graspologic-native v1.3.1 220.3K downloads/30d#9,306 on PyPI23
Permissive license Active released

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-native

uv

uv add graspologic-native

poetry

poetry add graspologic-native

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering :: Mathematics

Tags

leiden community detectiongraph clustering algorithmnetwork community detectiongraph partitioningnetwork analysis performancerust graph algorithmscommunity structure detection
graph-algorithmscommunity-detectionrust-extension

More Mathematics packages

Further reading