IO Ninja and Python Can Jam Together

IO Ninja and Python Can Jam Together

IO Ninja and Python Can Jam Together

IO Ninja + Python = ❤

The new Bare Mode in IO Ninja v5.9.1 enables test and debugging automation through external scripting.

With Bare Mode, you can now run all IO Ninja plugins from the command line (CLI) and control them from your favorite scripting language: Python, JavaScript, Perl, Ruby — you name it.

Bare Mode in ioninja-server

ioninja-server is the background workhorse that does all the heavy lifting on behalf of the IO Ninja app. It compiles plugin scripts, creates and manages Jancy* runtime environments, handles all IO, and turns raw data streams into the rich visualizations you see in the app.

With this release, ioninja-server learned a powerful new trick:

It can now run in standalone CLI mode — without the IO Ninja app.

Start ioninja-server with the –bare flag, specify which plugins to load, and pass their settings via simple .ini files (or a Jancy configuration script). The server will automatically start a session and route all events to stdout, ready for your Python script to consume and process.

$ ioninja-server \
--bare \
--plugin serial-tap-pro \
--plugin-settings-file ./my-serial-tap-pro-cfg.ini \
| python ./my-script.py

Processing IO Ninja Logs in Python

Last month, Tibbo’s published a blog post on post-processing IO Ninja log files with Python. It explains the logging engine and includes example Python snippets for parsing and analyzing the logs.

These same concepts — and nearly the same Python code — work in Bare Mode.

The only difference is that log records now arrive via stdout instead of a file, making real-time automation and analysis straightforward.

Debug With Style and Efficiency

You already know that IO Ninja excels at debugging serial, network, USB, and other types of interfaces. It offers:

  • A slick, polished user interface

  • A logging engine that is both beautiful and lightning-fast

  • A sophisticated hex packet editor with packet templates

  • Regex-based markup to auto-split streams into packets

  • An internal scripting engine

All of this makes IO Ninja a uniquely powerful communications debugger: all-in-one, scriptable, elegant, and fast.

With recent releases, Tibbo’s focused on making interoperability with Python and other popular scripting languages as smooth as possible.

IO Ninja + Python is a powerhouse combo for debugging IoT, industrial automation, and many other types of applications. See for yourself…

Download IO Ninja Now

Jancy is IO Ninja’s proprietary scripting language, optimized for efficiently processing large volumes of data. All Ninja plugins are written in Jancy.

Courtesy of Tibbo

share post: