Skip to main content
ntop-core is a Pythonic, NumPy-native wrapper around the nTop Core engine, built with nanobind. It replaces the raw ctypes marshalling shown in the Python Examples with a package you pip install and import ntop.core.
ntop-core-python is currently in beta. Breaking changes may occur between any two versions.

Installation

ntop-core-python runs on Python 3.10+. It is not published on PyPI; download it from app.ntop.com/addons. If you have received a copy of nTop Core with python_packages, run:

Locating the ntop_core library

At import time, ntop.core needs to find the ntop_core shared library (ntop_core.dll on Windows; on Linux, the highest-versioned libntop_core.so.<version> if one is present, otherwise the bare libntop_core.so). It searches, in order:
  1. The NTOP_CORE_LIB environment variable, if set, must point directly at the library file.
  2. A directory bundled alongside the package itself.
  3. $CONDA_PREFIX (when running inside a conda environment).
  4. The Windows Registry (InstallLocationNtopCore under HKLM\SOFTWARE\nTopology\nTopology).
  5. The default nTopology install path: %PROGRAMFILES%\nTopology\nTopology\ntop_core.dll on Windows (defaults to C:\Program Files\nTopology\nTopology\ntop_core.dll), or /opt/nTopology/nTopology/libntop_core.so on Linux.
  6. The ntopcl default install root (Linux only): /usr/local/ntop/nTop.
  7. The platform’s standard dynamic-linker search (ldconfig / PATH / LD_LIBRARY_PATH).
To point at a specific copy of the library, set NTOP_CORE_LIB before importing ntop.core:
Set NTOP_DEBUG_LIBRARY_LOAD=1 to log each discovery step to stderr, which is useful for diagnosing why the wrong library (or none) was found. Once loaded, ntop.core.__version__ reports the version of the ntop_core library that was actually picked up by discovery. This is the library’s own version, not the version of nTop that created any particular .implicit file.

Units

As with the rest of nTop Core, all coordinates, distances, and field values are in meters. Convert from your application’s native units before querying.

Next steps

  • Follow the Quickstart for a runnable, end-to-end walkthrough of every operation.
  • See the API Reference for every method, type, and exception exposed by the package.