Skip to main content

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.0},
  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

pivoterpy-2.1.0.tar.gz (37.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pivoterpy-2.1.0-cp38-abi3-win_amd64.whl (272.3 kB view details)

Uploaded CPython 3.8+Windows x86-64

pivoterpy-2.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (445.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

pivoterpy-2.1.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (757.0 kB view details)

Uploaded CPython 3.8+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file pivoterpy-2.1.0.tar.gz.

File metadata

  • Download URL: pivoterpy-2.1.0.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

Hashes for pivoterpy-2.1.0.tar.gz
Algorithm Hash digest
SHA256 e106f1c82a7d8ed3a68382bdfcb39e9101635f08364c3befa266be6aa69f513f
MD5 306e6bc020dd7a6029d4507d4ed9c0ba
BLAKE2b-256 7577b913007be76e46efcf133b9d78a90dfa7241dcaa3eb04be006ad8f14e499

See more details on using hashes here.

Provenance

The following attestation bundles were made for pivoterpy-2.1.0.tar.gz:

Publisher: publish.yml on 7e6i/pivoterpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pivoterpy-2.1.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pivoterpy-2.1.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 272.3 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

Hashes for pivoterpy-2.1.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3f27d271f99131c68342b8af45ec61092f31b8c57e8aea82ad111fa68df11c44
MD5 ff9e56a1d52919bbd1d47a079166cf6d
BLAKE2b-256 35da17dff9a9407b02d08ef9f8f063f345b95d3af8476728ab24c34467e7dd8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pivoterpy-2.1.0-cp38-abi3-win_amd64.whl:

Publisher: publish.yml on 7e6i/pivoterpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pivoterpy-2.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pivoterpy-2.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f5d5af999a96dbb7a9af4bb0dd7857f19c6dd7cdff9267998039b3723e7b83d
MD5 e0c78e7c2586ee514728d1bfb71a51d5
BLAKE2b-256 60bc6d2e916ef828b04207c315f3e30398799b62bfe37d306b03c4f5993c8eda

See more details on using hashes here.

Provenance

The following attestation bundles were made for pivoterpy-2.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on 7e6i/pivoterpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pivoterpy-2.1.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for pivoterpy-2.1.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a718158b9a5971f4c5ec09ea7cb3fd92a4ffe3585048ed33d5a0c59548208233
MD5 16b87ead9bc3ab6176d789a50756e272
BLAKE2b-256 9c8b414c59e83108b4b2eb02190edb520cecb48697868489e62ad99b9ae1b8df

See more details on using hashes here.

Provenance

The following attestation bundles were made for pivoterpy-2.1.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: publish.yml on 7e6i/pivoterpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page