Exact clique counting in Python and Rust, powered by the Pivoter algorithm.
Project description
pivoterpy
"I fear not the man who has implemented 1000 clique counting algorithms, I fear the man who has implemented 1 clique counting algorithm a thousand times" - Sun Tzu, The Art of War
pivoterpy — exact clique counting in Python and Rust, powered by the Pivoter algorithm (Jain & Seshadhri, 2020). You get a small Python API: build a graph, run pivoter, read counts at global, vertex, or edge resolution. Work is done by a Rust extension by default, with a pure Python backend when you need it.
Repo: github.com/7e6i/pivoterpy · Documentation: 7e6i.github.io/pivoterpy
Install
pip install pivoterpy
From source (needs Rust + Maturin): clone the repo, then maturin develop --release in the project root. More detail: Installation.
Quick start
import pivoterpy as pvt
G = pvt.from_edge_list([(0, 1), (1, 2), (2, 0)])
P = pvt.pivoter(G) # default: resolution="global", backend="rust"
# P.global_counts[k] == number of k-cliques
print(P.global_counts)
Use resolution="vertex" or "edge" for local counts; backend="python" if the Rust wheel is not available. See Usage.
Citation
Always cite the original Pivoter paper: arXiv:2001.06784.
BibTeX for this package:
@software{anderson_pivoterpy_2026,
author = {Spencer Anderson},
title = {{pivoterpy}},
year = {2026},
version = {2.1.1},
url = {https://github.com/7e6i/pivoterpy}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pivoterpy-2.1.1.tar.gz.
File metadata
- Download URL: pivoterpy-2.1.1.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dccdca2481d097282a5f84c3468958fe67df6d475982301b2f91c27f20bcb66
|
|
| MD5 |
d2b0b1c04961f96e77510c08ae4b62aa
|
|
| BLAKE2b-256 |
87877ae03a6701f315ae49d26cb20775f8c5ad18799a8947098f7798bd23566f
|
Provenance
The following attestation bundles were made for pivoterpy-2.1.1.tar.gz:
Publisher:
publish.yml on 7e6i/pivoterpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pivoterpy-2.1.1.tar.gz -
Subject digest:
6dccdca2481d097282a5f84c3468958fe67df6d475982301b2f91c27f20bcb66 - Sigstore transparency entry: 1367143537
- Sigstore integration time:
-
Permalink:
7e6i/pivoterpy@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/7e6i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pivoterpy-2.1.1-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: pivoterpy-2.1.1-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 258.4 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1cba3caf5e827eaf8ca94b8ef9d066853015f95c3e35106a6718070d76a3522
|
|
| MD5 |
f113541b9e144b32333ce205313a9131
|
|
| BLAKE2b-256 |
2de2c081c66205976ca4280b85f7254ef24743aa24dad4ee46ae0cebffeff246
|
Provenance
The following attestation bundles were made for pivoterpy-2.1.1-cp38-abi3-win_amd64.whl:
Publisher:
publish.yml on 7e6i/pivoterpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pivoterpy-2.1.1-cp38-abi3-win_amd64.whl -
Subject digest:
c1cba3caf5e827eaf8ca94b8ef9d066853015f95c3e35106a6718070d76a3522 - Sigstore transparency entry: 1367143572
- Sigstore integration time:
-
Permalink:
7e6i/pivoterpy@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/7e6i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pivoterpy-2.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pivoterpy-2.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 430.1 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
940c2fcbdad00b988d88ed5bf806f22749e3f9ac3743297bd4db0a8cc5cb7142
|
|
| MD5 |
d72884bf0094b149de6abd3f360de0d6
|
|
| BLAKE2b-256 |
4e2f68368fde8744a7320601664c817d7d5e16b4f0155d3754bfc50b47ac5a6c
|
Provenance
The following attestation bundles were made for pivoterpy-2.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish.yml on 7e6i/pivoterpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pivoterpy-2.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
940c2fcbdad00b988d88ed5bf806f22749e3f9ac3743297bd4db0a8cc5cb7142 - Sigstore transparency entry: 1367143603
- Sigstore integration time:
-
Permalink:
7e6i/pivoterpy@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/7e6i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pivoterpy-2.1.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: pivoterpy-2.1.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 726.5 kB
- Tags: CPython 3.8+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26c4633b8b3f7f049c4f508596ddcdb0c1addc584ed9c629d81b8ff5aa1119b
|
|
| MD5 |
c7ae79427b6fb2cbac8e352bf98c2cc7
|
|
| BLAKE2b-256 |
f2d2a0b362eaa0a91869aca077fffaaaad6577be29a24cece79e57af490f1e5e
|
Provenance
The following attestation bundles were made for pivoterpy-2.1.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
publish.yml on 7e6i/pivoterpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pivoterpy-2.1.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
d26c4633b8b3f7f049c4f508596ddcdb0c1addc584ed9c629d81b8ff5aa1119b - Sigstore transparency entry: 1367143646
- Sigstore integration time:
-
Permalink:
7e6i/pivoterpy@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/7e6i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a11d7fa23c776a132dd6e469ec050e7b1033f849 -
Trigger Event:
release
-
Statement type: