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 Windows BENCHLAB service HTTP API — requires --service-url (default http://localhost:8585)

Common connection flags:

--source SOURCE          direct | fastapi | fastapi_custom | mqtt | mqtt_custom | named_pipe | service_http
--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 Windows service HTTP API URL (default: http://localhost:8585)
-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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchlab_pytools-3.0.4.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchlab_pytools-3.0.4-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file benchlab_pytools-3.0.4.tar.gz.

File metadata

  • Download URL: benchlab_pytools-3.0.4.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for benchlab_pytools-3.0.4.tar.gz
Algorithm Hash digest
SHA256 6d70696afcbc3bb14688a971b1351a692fd86138b3061f47e05b5c64016fafcf
MD5 508437d55302d15771505711a96ac2ea
BLAKE2b-256 a7f43daefeed4913554a6b403785dad64a6541ae7f6991bcac69887246fbe763

See more details on using hashes here.

Provenance

The following attestation bundles were made for benchlab_pytools-3.0.4.tar.gz:

Publisher: release.yml on BenchLab-io/benchlab-pytools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file benchlab_pytools-3.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for benchlab_pytools-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 92a181684650019790fe51c4f9ea647a867d499b107e3e4e50afcc722348fbff
MD5 32d9678e5e11fd93beb73882e5429a16
BLAKE2b-256 a322871159d60757f227fed8dc446d4bb66cb1953498afda5f7a672394959bbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for benchlab_pytools-3.0.4-py3-none-any.whl:

Publisher: release.yml on BenchLab-io/benchlab-pytools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.0.4 This release

2 files

3.0.3

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page