sc-cluster-libreville
Seeded, deterministic, parallel Leiden community detection (modularity), written in Rust. The same seed gives the same labels at any number of threads, so results are reproducible on a laptop and on a 64-core server. The parallel design follows GVE-Leiden (Sahu et al. 2024, arXiv:2312.13936), with synchronous, order-independent moves instead of asynchronous ones.
pip install sc-cluster-libreville # import cluster_libreville
import cluster_libreville as cl
import numpy as np
# a symmetric scipy sparse matrix, e.g. scanpy's kNN connectivities
graph = adata.obsp["connectivities"]
labels = cl.leiden(graph, resolution=1.0, seed=0) # int32, 0 = largest
cl.modularity(graph, labels) # of any labels on the graph, e.g. to compare partitions
# scanpy-style: writes adata.obs["leiden"] (categorical) like sc.tl.leiden
cl.tl.leiden(adata, resolution=1.0, random_state=0)
# an undirected edge list: polars / pandas / pyarrow / numpy columns
labels = cl.leiden_edges(df["src"], df["dst"], df["weight"], seed=0)
# experimental, the API may change. Pick the resolution (CHAMP): Leiden over resolutions x seeds, keep the partitions that are best somewhere
c = cl.champ(graph, np.logspace(-1, 1, 20), seeds=np.arange(5)) # metric="nvi" (default) or "ami"
cl.ecs(c.labels[0], c.labels[1]) # per-cell element-centric similarity: which cells move between two partitions
c.labels[c.best] # the widest resolution range; c.to_seeds near 0 = stable across seeds
cl.tl.champ(adata) # scanpy-style: adata.obs["champ"], adata.uns["champ"]["domains"]
Options: resolution, seed, n_iterations (-1: until an iteration changes nothing),
theta (refinement randomness), min_gain (optional early stop), threads (default: all
cores; never changes the result).
License: MIT.
Metadata
Release files for sc-cluster-libreville 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sc_cluster_libreville-0.1.0.tar.gz | 109.5 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| sc_cluster_libreville-0.1.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| sc_cluster_libreville-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| sc_cluster_libreville-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| sc_cluster_libreville-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| sc_cluster_libreville-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 2.6 MB
Release files / sc_cluster_libreville-0.1.0.tar.gz
| Download URL | sc_cluster_libreville-0.1.0.tar.gz |
|---|---|
| Size | 109.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0254c12bad260d082193050b77703de259fcccdee4f3f6643dc1aa61fb1cb2d9
|
|
BLAKE2b-256 checksum How to use checksums |
6c1c0671641253544c438c2865b8b722d4d8a24df8c9df23c3ad17b0bdc9bb83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / sc_cluster_libreville-0.1.0-cp310-abi3-win_amd64.whl
| Download URL | sc_cluster_libreville-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 427.5 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e1dad0a1d3addd62ee85298d84ab00ccb13c210a64945eb15a66b13054b7fb12
|
|
BLAKE2b-256 checksum How to use checksums |
1a223e3c2706ef7282f555c67cfbb7a0ccee759fb2eb770c072394d038d23f66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / sc_cluster_libreville-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | sc_cluster_libreville-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 532.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a593aa18936b461502e823192bb4d09a5aa2b76dcffef60b6fb9a0bf61f61c23
|
|
BLAKE2b-256 checksum How to use checksums |
a49e8d6cb3b308f615c0d15b38913573e45f745ce6857243190fb843ab8aa808
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / sc_cluster_libreville-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | sc_cluster_libreville-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 512.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8f0acc0031b7093e99297593abb78108b0ee9e2c0b22cfd9a7ecd3b1e087bc69
|
|
BLAKE2b-256 checksum How to use checksums |
1bad188e1418718892d90c57b3385afc71f4cebff9ea4d8737cad6820c533c1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / sc_cluster_libreville-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | sc_cluster_libreville-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 475.9 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
929829970cf621e65b68c92794fa254c1575b0c55c1debb8dcc9414a8bbdda5b
|
|
BLAKE2b-256 checksum How to use checksums |
b4a90381c5c6349f393db7bc194de4d4b75043f528740baa3cdaab9fa62ddb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / sc_cluster_libreville-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | sc_cluster_libreville-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 500.2 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6cdf7435be8fa1ae76a2c1f6501ab6d6bbc95a4dbf4c4635664229c67b075d72
|
|
BLAKE2b-256 checksum How to use checksums |
2cbd1244523ef72db2b19a163d72b5a50f0679bffdb1f13a283675c310547179
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for sc-cluster-libreville 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for sc_cluster_libreville-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.