Skip to main content

BENCHLAB PyTools

BENCHLAB PyTools is the Python-based control suite for BENCHLAB telemetry devices. It provides a shared telemetry pipeline — device discovery, data sourcing, and process management — plus a set of consumer tools built on top of it:

  • TUI — interactive terminal dashboard for live monitoring
  • CSV Logger — fleet-wide telemetry logging for offline analysis
  • FastAPI Server — REST API for telemetry, exposed for other tools/integrations
  • Graph — DearPyGui-based real-time sensor graphing
  • HWiNFO Export — exposes sensors as HWiNFO64 custom sensors
  • MQTT Publisher — publishes telemetry to a local or remote MQTT broker
  • Link — publishes telemetry to the BENCHLAB cloud (SaaS) MQTT broker
  • VU Dials — analog-style VU meter dial display and configuration
  • WigiDash — telemetry/graph display on a G.SKILL WigiDash panel
  • Config Tool — import/export device configuration (fan curves, RGB, etc.) via JSON

All tools share a common data-source layer, so the same telemetry can be read directly from a device, through a FastAPI server, over MQTT, or via the Windows BENCHLAB service — locally or remotely — without changing the consumer tool.


Installation

Requires Python 3.10+.

From PyPI

pip install benchlab-pytools

This installs a benchlab console command on your PATH (see Command-Line Flags below). Install with extras for the tools you need, e.g. pip install "benchlab-pytools[tui]".

From source

pip install -r benchlab/requirements.txt

Each tool has its own requirements.txt (e.g. benchlab/graph/requirements.txt, benchlab/vu/requirements.txt). The launcher installs a tool's requirements automatically the first time it's run — you generally don't need to install them by hand.


Usage

Interactive Menu

Run with no arguments to enter the interactive launcher:

python benchlab.py

or equivalently:

python -m benchlab

If installed from PyPI, use the benchlab command instead:

benchlab

The interactive menu (prompt_toolkit-based, with a plain-input fallback if prompt_toolkit isn't installed) lets you pick a data source and one or more tools, then launches them — installing any missing per-tool dependencies along the way.

Command-Line Flags

Each tool can also be launched directly with a flag. If installed from PyPI, replace python -m benchlab with benchlab in the examples below (e.g. benchlab -tui).

python -m benchlab -tui         # Interactive terminal dashboard
python -m benchlab -logfleet    # CSV logger (no TUI)
python -m benchlab -fastapi     # FastAPI telemetry server
python -m benchlab -graph       # DearPyGui graph
python -m benchlab -hwinfo      # HWiNFO custom sensor export
python -m benchlab -mqtt [broker]  # MQTT publisher (default broker: localhost)
python -m benchlab -link        # Publish telemetry to BENCHLAB cloud (Link)
python -m benchlab -vu          # VU analog dials
python -m benchlab -vuconfig    # VU dial configuration UI
python -m benchlab -wigidash    # WigiDash display
python -m benchlab -config ...  # Device configuration import/export

Running with no flags is equivalent to launching the interactive menu.

Data Sources

Most tools accept --source to choose where telemetry comes from:

Source Description
direct (default) Direct USB-serial connection via benchlab-pycore
fastapi Local FastAPI server, started automatically if not already running
fastapi_custom Remote FastAPI server — requires --api-url
mqtt Local MQTT broker + publisher, started automatically if needed
mqtt_custom Remote/existing MQTT broker — requires --mqtt-broker/--mqtt-port
named_pipe Windows BENCHLAB service (BL_Service) via named pipes — Windows only
service_http BENCHLAB service HTTP API (polling) — requires --service-url (default http://localhost:8585)
service_ws BENCHLAB service WebSocket event stream (/events, push) — requires --service-ws-url (default ws://localhost:8585/events); needs the service_ws extra

service_ws consumes the same BENCHLAB service as service_http but over its /events WebSocket: telemetry is pushed at the service's own cadence instead of polled, and device connect/disconnect is reflected without a manual rescan. Install its dependency with pip install "benchlab-pytools[service_ws]".

Common connection flags:

--source SOURCE          direct | fastapi | fastapi_custom | mqtt | mqtt_custom | named_pipe | service_http | service_ws
--api-url URL             FastAPI base URL (default: http://127.0.0.1:8000)
--api-port PORT           FastAPI port (default: 8000)
--mqtt-broker HOST         MQTT broker host (default: localhost)
--mqtt-port PORT           MQTT broker port (default: 1883)
--service-url URL          BENCHLAB service HTTP API URL (default: http://localhost:8585)
--service-ws-url URL       BENCHLAB service WebSocket event stream URL (default: ws://localhost:8585/events)
--service-token TOKEN      X-Benchlab-Token for the BENCHLAB service (only if token auth is enabled)
-i, --interval SECONDS     Refresh interval (default: 1.0)

When a source needs a background service (fastapi, mqtt), the launcher starts and health-checks it automatically, and tears it down on exit. Not every tool supports every source — the config tool, for example, only supports direct and named_pipe. See each tool's README for specifics.

Launch Profiles

A named profile can bundle a data source and a set of tools to start together:

python -m benchlab --profile gskill_ctex26

Profiles are defined in benchlab/tools.py (LAUNCH_PROFILES). Each spawns its tools in separate terminal windows and manages them as a group.


Architecture

  • benchlab/main.py — CLI argument parsing and mode dispatch (launch_mode())
  • benchlab/launcher.py — in-process and multi-terminal tool launching, process lifecycle
  • benchlab/sources.py — data-source detection, startup, and teardown for all supported sources
  • benchlab/tools.py — the CONSUMER_TOOLS registry (tool metadata, module/function to invoke, dependencies) and LAUNCH_PROFILES
  • benchlab/menu.py / benchlab/menu_classic.py — interactive terminal menu (prompt_toolkit, with a plain-input fallback)
  • benchlab/core/ — shared internals used by every tool: device discovery, the data-source abstraction, process management, retry logic. See benchlab/core/README.md.

Each consumer tool lives in its own subpackage under benchlab/ with its own README, and (where needed) its own requirements.txt.

Adding a New Tool

  1. Add an entry to CONSUMER_TOOLS in benchlab/tools.py with name, flag, module, function, and requirements.
  2. Implement the tool's entry function in its module, accepting an args namespace (see benchlab/launcher.py::_build_args_namespace).
  3. Add a CLI flag for it in benchlab/main.py::get_parser() and dispatch it in launch_mode().
  4. Add a requirements.txt in the tool's directory if it has extra dependencies.
  5. Write a README.md in the tool's directory following the style of the existing ones.

Tool Documentation


License

Part of BENCHLAB PyTools. See main project license for details.

Metadata

Release files for benchlab-pytools 3.1.0

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

Source distribution (sdist)

Source distribution for benchlab-pytools 3.1.0
File Size Uploaded
benchlab_pytools-3.1.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for benchlab-pytools 3.1.0
File Interpreter ABI Platform
benchlab_pytools-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / benchlab_pytools-3.1.0.tar.gz

Download URL benchlab_pytools-3.1.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
7ffeb40fe5436abe1571d53a2ff9c412889c45f0214372a58f9cd73bd23291df
BLAKE2b-256 checksum
How to use checksums
199ef8e18545a7e57687168e292b94e81aeb23a7ba83c1c47f087db00ffdd5d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 8, 2026.

Transparency log

Release files / benchlab_pytools-3.1.0-py3-none-any.whl

Download URL benchlab_pytools-3.1.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6a5fd5e2dc3334d12cb709e1c87c51660caeb0309d7045d41d0453e5aea7e301
BLAKE2b-256 checksum
How to use checksums
70fa6d52da8bd6e4556207e5209050994227ead7f6cbb3961e13bba55b815c12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

This release

3.1.0 This release

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 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