Skip to main content

NetworKit is a toolbox for high-performance network analysis

Project description


NetworKit - Large-scale Network Analysis

NetworKit

High-performance tools for large-scale network analysis
Explore the docs »

Try Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Building from Source
  5. Documentation
  6. Contributing
  7. License
  8. Contact
  9. Publications

About The Project

NetworKit is an open-source toolkit for high-performance network analysis, designed to handle large networks ranging from thousands to billions of edges. Built with efficiency and scalability at its core, NetworKit implements parallel graph algorithms that leverage multicore architectures to compute standard measures of network analysis.

As both a production tool and a research testbed for algorithm engineering, NetworKit includes novel algorithms from recent publications alongside battle-tested implementations. The toolkit is available as a Python module with high-performance C++ algorithms exposed through Cython, combining Python's interactivity and rich ecosystem with C++'s computational efficiency.

(back to top)

Key Features

  • Scalable: Analyze networks with billions of edges
  • Fast: Parallel algorithms utilizing multicore architectures
  • Comprehensive: Wide range of network analysis algorithms
  • Interactive: Python interface with Jupyter notebook support
  • Flexible: Available as Python module or standalone C++ library
  • Research-ready: Includes state-of-the-art algorithms from recent publications

(back to top)

Getting Started

Installation

Python Module

For most users, NetworKit can be installed directly via package managers with no additional requirements other than Python 3.9+.

Package Manager Command
pip pip install networkit
conda conda install -c conda-forge networkit
brew brew install networkit
spack spack install py-networkit

C++ Core Library Only

If you only need the C++ core without Python bindings:

Package Manager Command
conda conda install -c conda-forge libnetworkit
brew brew install libnetworkit
spack spack install libnetworkit

More platform-specific installation instructions can be found in our getting started guide.

(back to top)

Usage

Here's a quick example showing how to generate a random hyperbolic graph with 100k nodes and detect communities:

from networkit.generators import HyperbolicGenerator
from networkit.community import detectCommunities

# Generate a random hyperbolic graph
g = (
    HyperbolicGenerator(1e5)
    .generate()
)

# Detect communities
detectCommunities(g, inspect=True)

Output:

PLM(balanced,pc,turbo) detected communities in 0.14577102661132812 [s]
solution properties:
-------------------  -----------
# communities        4536
min community size      1
max community size   2790
avg. community size    22.0459
modularity              0.987243
-------------------  -----------

More Examples

Compute PageRank to rank nodes by importance:

from networkit.centrality import PageRank

pr = (
    PageRank(g)
    .run()
)
top_nodes = pr.ranking()[:10]

Analyze graph structure with connected components:

from networkit.components import ConnectedComponents

cc = (
    ConnectedComponents(g)
    .run()
)
print(f"Components: {cc.numberOfComponents()}")
print(f"Largest: {max(cc.getComponentSizes().values())}")

For comprehensive examples and tutorials, explore our interactive notebooks, especially the NetworKit User Guide. You can try NetworKit directly in your browser using our Binder instance.

(back to top)

Building from Source

Prerequisites

Building from source requires:

  • C++ Compiler: g++ (>= 10.0), clang++ (>= 11.0), or MSVC (>= 14.30)
  • OpenMP: For parallelism (usually included with compiler)
  • Python: 3.9 or higher with development libraries
    • Debian/Ubuntu: apt-get install python3-dev
    • RHEL/CentOS: dnf install python3-devel
    • Windows: Official installer
  • CMake: Version 3.6 or higher
  • Build System: Make or Ninja

Python Module

git clone https://github.com/networkit/networkit networkit
cd networkit
pip install cython numpy setuptools wheel
python setup.py build_ext [-jX]
pip install -e .

The -jX option specifies the number of threads for compilation (e.g., -j4 for 4 threads). If omitted, it uses all available CPU cores.

C++ Core Library

mkdir build && cd build
cmake ..
make -jX
sudo make install

Using NetworKit in Your C++ Project

After installation, include NetworKit headers:

#include <networkit/graph/Graph.hpp>

Compile your project:

g++ my_file.cpp -lnetworkit

Running Unit Tests

To build and run tests:

cmake -DNETWORKIT_BUILD_TESTS=ON ..
make
./networkit_tests --gtest_filter=CentralityGTest.testBetweennessCentrality

Building with Sanitizers

For debugging with address/leak sanitizers:

cmake -DNETWORKIT_WITH_SANITIZERS=leak ..

(back to top)

Documentation

The complete documentation is available online at networkit.github.io.

(back to top)

Contributing

We welcome contributions to NetworKit! Whether you're fixing bugs, adding features, or improving documentation, your help makes NetworKit better for everyone.

  1. Check our development guide for instructions
  2. Browse open issues or open a new one
  3. Fork the repository and create your feature branch
  4. Submit a pull request

For support, join our mailing list.

(back to top)

License

Distributed under the MIT License. We ask that you cite us if you use NetworKit in your research (see our technical report and publications page).

(back to top)

Contact

(back to top)

Publications

NetworKit has been used in numerous research projects. Visit our publications page for a complete list of papers about NetworKit, algorithms implemented in NetworKit, and research using NetworKit.

(back to top)

Credits

NetworKit is developed by a dedicated team of researchers and contributors. View the full list of contributors on our credits page.

(back to top)

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

networkit-11.2.1.tar.gz (7.3 MB view details)

Uploaded Source

Built Distributions

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

networkit-11.2.1-cp313-cp313-win_amd64.whl (29.9 MB view details)

Uploaded CPython 3.13Windows x86-64

networkit-11.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

networkit-11.2.1-cp313-cp313-macosx_15_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

networkit-11.2.1-cp312-cp312-win_amd64.whl (29.9 MB view details)

Uploaded CPython 3.12Windows x86-64

networkit-11.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

networkit-11.2.1-cp312-cp312-macosx_15_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

networkit-11.2.1-cp311-cp311-win_amd64.whl (30.0 MB view details)

Uploaded CPython 3.11Windows x86-64

networkit-11.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

networkit-11.2.1-cp311-cp311-macosx_15_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

networkit-11.2.1-cp310-cp310-win_amd64.whl (30.0 MB view details)

Uploaded CPython 3.10Windows x86-64

networkit-11.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

networkit-11.2.1-cp310-cp310-macosx_15_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file networkit-11.2.1.tar.gz.

File metadata

  • Download URL: networkit-11.2.1.tar.gz
  • Upload date:
  • Size: 7.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for networkit-11.2.1.tar.gz
Algorithm Hash digest
SHA256 3e4766c8e32e83f676fe61358af1bd195ecd3ab996fda803a9a1a7a9af40b725
MD5 fa7cdcda8ff4156693d80a76568fea01
BLAKE2b-256 999170896ebe40b64646e6fc1b3a91842fab97debfbea76188066e010b80bd7b

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: networkit-11.2.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 29.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for networkit-11.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3bb19d0745686f5d1db8baf6f2540237841f004d278a0b03653e37fd3b0865a8
MD5 1670bda46c8e82b55fe0dcb2730debbf
BLAKE2b-256 c9cc545bb57126753d10ac4dd069667304c2b17fd896334995e11589758f796e

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7586fb2038609c6335d8061ca586a70572c310c018dbd93150761d39b7741ddb
MD5 7824b232857b2a096eff6c997994cb0c
BLAKE2b-256 a06673cd49833c0b1f410d09751d535133aeae249b9e58e697a7d5d8558833d4

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bc9ce028a0d9dd19feeea8881aa172940ca8e668a35da3e04c3a46ee6ccc0d27
MD5 833e63128ea5e5bc98280e2ae80ca4cc
BLAKE2b-256 1bc856fd8a462d3812bf9766b328ec1edadb154cd12058da6f8d2f30d914b84b

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: networkit-11.2.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 29.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for networkit-11.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7ac666766bffc5428b3992f09c01619a1661d37634ab91ae523776ec0c412698
MD5 9df890e1c91b48384da3c5ca403ce653
BLAKE2b-256 3f2b5658c2bd38e5056a0b7219193768182671fc5647ca20134ae560b42b8400

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 986113605c472eaf09a453b062a465a2966772be9864244d75baac95a90c6212
MD5 b2733e8a234c68556f38bb35ab7509bf
BLAKE2b-256 adeb1442c1dc936e3fded65092d1e7b108448cb72764dbd849ffa3bfcc83e903

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d0e7c280f46a22787453239000895d07a41ab4e8db56aa30f204185d7f8d495f
MD5 d69cb4ed4382255452cfa6ec0d89479d
BLAKE2b-256 fcf9f13ec4f34f995ec97ad6f129ebb9b605d4014a4584ffc3c628abe3b896a0

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: networkit-11.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 30.0 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for networkit-11.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 09e130d586ed0f28b589218444ccb109ae3fda4b03d678ae888d00bcec9f212e
MD5 7f1157797599e6ff9a1e37c4662ef6b6
BLAKE2b-256 2934f295d702572f91da6d15a126319450c6b0678fe4f29de4e16b34077b45f0

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d37ce01bc2f11446acd06dea609c95b51cd2cc5c809194298f85fcb618c22811
MD5 4bd2a8a531c1df91b314307d94b2110a
BLAKE2b-256 c2ca04d84d2922c11074100feff2d1ab354b00b17611f9a0e8456fcdcd87209a

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 717d8db98f7b053e3fe72f9e5d6de4720e596d37674828d93c6c8886eafc377f
MD5 55e1f1888df596cf15979750dcf84a3a
BLAKE2b-256 641c608622ec43f378911181f4eee1996adac2b5f69fbc3137b341312a2c2833

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: networkit-11.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 30.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for networkit-11.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e39667ba99eb0c64bc0692b27de1e9ce8931d1542e63eb03ef3e58bb4dd109c0
MD5 df370d1dfeb8705e4fef297f03cd9216
BLAKE2b-256 ee960c901166bb6c06c6672deef54194932d11f5e0bfbcc3e240b15d36478faf

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3f2454222226c3adf62c7e1642717ab3a1731dfd37525a70ab1339a686eb77dd
MD5 77219ea9f38793c0cea2bfe7df0a6681
BLAKE2b-256 e3f069a29b651e638b703d005ba23c39a9a04a35f43054a0626c6dc65687bfd3

See more details on using hashes here.

File details

Details for the file networkit-11.2.1-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for networkit-11.2.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 15e15052d97686e149a7ac9e33faa82d85f92d4230f1ae642753dff7c2e0557c
MD5 29abadc76587c16ec6a7c6d68566f1b0
BLAKE2b-256 7cb0ac104097761b823b403dc3f732a17e318aa8ed08d88c1894259a404f19c8

See more details on using hashes here.

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