Skip to main content

Objective:

Learn how to execute an nTop notebook using nTop Automate (ntopcl) within Python scripts to enable automated, repeatable workflows.

Applies to:

  • Automating nTop notebooks for engineering workflows
  • Interacting with external software suites and databases

Procedure:

  • Prepare the nTop notebook and JSON input for running nTop Automate
  • Use Python’s json module to save your input data (formatted as a dictionary) into a .json file.
  • Execute the nTop Automate process using Python’s subprocess module
  • Python Script_JSON.py will run a Windows process command like
"C:/Program Files/nTopology/nTopology/nTopCL.exe" -j input.json -o out.json SampleFile.ntop
  • Check if the return messages are printed as below.
Feel free to change this script to batch process your workflow by passing input lists in a For Loop!
And that’s it! You’ve successfully run your nTop notebook using a Python script. Are you still having issues? Contact the support team, and we’ll be happy to help!

Download the Example file:

Keywords:

ntopcl command line python api script run scripts code cl