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]". The pytools FastAPI server (fastapi/fastapi_custom) also exposes an /events endpoint with the same frame envelope, so --source service_ws --service-ws-url ws://<fastapi-host>:<port>/events works against it too — see benchlab/restapi/readme.md.

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.2.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.2.0
File Size Uploaded
benchlab_pytools-3.2.0.tar.gz 1.6 MB Details

Built distribution (wheel)

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

Total release size: 3.3 MB

Release files / benchlab_pytools-3.2.0.tar.gz

Download URL benchlab_pytools-3.2.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
cb3843c57bffed1a79676a9ccf5e9db00e5295bfa1762d340078c2b55c779dba
BLAKE2b-256 checksum
How to use checksums
d5d040720bdf634379bfbc4d08ea09b63989342676969fdfa161ff1593a3f461
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 29, 2026.

Transparency log

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

Download URL benchlab_pytools-3.2.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c3d7582e2ae3137a8168f902dc03ae1673948cd4e20e877763355f413b1b5a35
BLAKE2b-256 checksum
How to use checksums
35834fabd8acd8486ad4bcb6f00922664ec647c21cb926d0e7c82c51ac9fdb9c
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 29, 2026.

Transparency log

Release history Release notifications | RSS feed

3.3.0

2 release files

3.2.1

2 release files

This release

3.2.0 This release

2 release files

3.1.0

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