Skip to main content

NetworKit Bindings for KaMinPar

KaMinPar is a shared-memory parallel tool to heuristically solve the graph partitioning problem: divide a graph into k disjoint blocks of roughly equal weight while minimizing the number of edges between blocks. This Python package provides bindings to KaMinPar and integrates with the NetworKit library to offer a fast and scalable graph partitioning algorithm.

Installation

You can install the NetworKit bindings for KaMinPar via pip:

pip install kaminpar-networkit

Alternatively, you can build the bindings from source:

git clone https://github.com/KaHiP/KaMinPar.git
pip install KaMinPar/bindings/networkit

When building the NetworKit bindings from source, the dependencies of KaMinPar must be available on the system. These include CMake, Intel TBB and Sparsehash. Additionally, if you install the package via pip on a target system and Python version where no pre-built wheel is available, the package will fall back to building from the source distribution. In this case, you must also ensure that the required dependencies are installed on your system.

Usage

The following is a basic example of how to use the KaMinPar bindings. For the full API documentation, refer to the documentation file.

import kaminpar_networkit as kaminpar
import networkit

# Use NetworKit to read a graph from disk stored in METIS format and output statistics for the graph.
graph = networkit.readGraph("hyperlink.metis", networkit.Format.METIS)
networkit.overview(graph)

# Create a KaMinPar instance and compute a partition of the graph into four blocks using imbalance factor 3%.
shm = kaminpar.KaMinPar(graph)
partition = shm.computePartitionWithEpsilon(4, 0.03)

edge_cut = networkit.community.EdgeCut().getQuality(partition, graph)
print("Computed a partition with an edge cut of", edge_cut)

License

The NetworKit bindings for KaMinPar and KaMinPar are free software provided under the MIT license. If you use KaMinPar in an academic setting, please cite the appropriate publication(s) listed below.

// KaMinPar
@InProceedings{DeepMultilevelGraphPartitioning,
  author    = {Lars Gottesb{\"{u}}ren and
               Tobias Heuer and
               Peter Sanders and
               Christian Schulz and
               Daniel Seemaier},
  title     = {Deep Multilevel Graph Partitioning},
  booktitle = {29th Annual European Symposium on Algorithms, {ESA} 2021},
  series    = {LIPIcs},
  volume    = {204},
  pages     = {48:1--48:17},
  publisher = {Schloss Dagstuhl - Leibniz-Zentrum f{\"{u}}r Informatik},
  year      = {2021},
  url       = {https://doi.org/10.4230/LIPIcs.ESA.2021.48},
  doi       = {10.4230/LIPIcs.ESA.2021.48}
}

// dKaMinPar (distributed KaMinPar)
@InProceedings{DistributedDeepMultilevelGraphPartitioning,
  author    = {Sanders, Peter and Seemaier, Daniel},
  title     = {Distributed Deep Multilevel Graph Partitioning},
  booktitle = {Euro-Par 2023: Parallel Processing},
  year      = {2023},
  publisher = {Springer Nature Switzerland},
  pages     = {443--457},
  isbn      = {978-3-031-39698-4}
}

// [x]TeraPart (memory-efficient [d]KaMinPar)
@misc{TeraPart,
      title={Tera-Scale Multilevel Graph Partitioning}, 
      author={Daniel Salwasser and Daniel Seemaier and Lars Gottesbüren and Peter Sanders},
      year={2024},
      eprint={2410.19119},
      archivePrefix={arXiv},
      primaryClass={cs.DS},
      url={https://arxiv.org/abs/2410.19119}, 
}

// Worst-Case Linear-Time Multilevel Graph Partitioning
@misc{LinearTimeMGP,
      title={Linear-Time Multilevel Graph Partitioning via Edge Sparsification},
      author={Lars Gottesbüren and Nikolai Maas and Dominik Rosch and Peter Sanders and Daniel Seemaier},
      year={2025},
      eprint={2504.17615},
      archivePrefix={arXiv},
      primaryClass={cs.DS},
      url={https://arxiv.org/abs/2504.17615},
}

Metadata

Release files for kaminpar-networkit 3.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kaminpar-networkit 3.7.3
File Size Uploaded
kaminpar_networkit-3.7.3.tar.gz 7.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kaminpar-networkit 3.7.3
File
kaminpar_networkit-3.7.3-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
kaminpar_networkit-3.7.3-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
kaminpar_networkit-3.7.3-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
kaminpar_networkit-3.7.3-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details

Total release size: 15.6 MB

Release files / kaminpar_networkit-3.7.3.tar.gz

Download URL kaminpar_networkit-3.7.3.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6173d3e46360549eac2febfa6e8c8f1f1c321e858245469b681322bfd8e83172
BLAKE2b-256 checksum
How to use checksums
f362ecac1729722a6052599b8a14c7af65f8114d9c352553493eccaaa94b8327
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 27, 2026.

Transparency log

Release files / kaminpar_networkit-3.7.3-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL kaminpar_networkit-3.7.3-cp313-cp313-manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
06fe64d330940a2c107235396cd65c8b117da6e4fcfdbea961a4a6fff3c6e119
BLAKE2b-256 checksum
How to use checksums
cd9ccf79d2cfb43026265a0caf18da4d2e6c4311c828b69ed98fd44eab118749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 27, 2026.

Transparency log

Release files / kaminpar_networkit-3.7.3-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL kaminpar_networkit-3.7.3-cp312-cp312-manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c8e05d0aa9b97eb25554362acd3a548b10704d8a1ca5a2f1a1606f7c29dca112
BLAKE2b-256 checksum
How to use checksums
a458be54ac4cd71bf43066b48c04df01635274954fe6e6a92df5e49345f6bf4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 27, 2026.

Transparency log

Release files / kaminpar_networkit-3.7.3-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL kaminpar_networkit-3.7.3-cp311-cp311-manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6426876cedca6c9f3fc8afd4c68f16383a890b7dc006174ad7a4268117016dcd
BLAKE2b-256 checksum
How to use checksums
bf04365333f546e5c80e7cf8f861b473f9b0acb8fa539ec4c1fab12222e914c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 27, 2026.

Transparency log

Release files / kaminpar_networkit-3.7.3-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL kaminpar_networkit-3.7.3-cp310-cp310-manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
49d740398b8896c0869236c276a8621c36262e20e1294d7d4ca27d5f22aa1a28
BLAKE2b-256 checksum
How to use checksums
debcd27fba284df02bdb36e2d5ffd81b2749aec6d5fd7549f7dc06e1cb1a2efe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.7.3 This release

5 release files

3.7.2

5 release files

3.7.1

5 release files

3.7.0

5 release files

3.6.0

5 release files

3.4.1

5 release files

3.4.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page