CLI client for interacting with Qestit QRM data from LumenRadio tooling.
Project description
QRM
CLI + Python client for interacting with the Qestit QRM.
Install
pip install lr-qrm
Quick start
Login
Interactive login (prompts for username/password):
qrm login --base-url https://example.com
Non-interactive (for CI/CD):
export QRM_USERNAME="<insert username>"
export QRM_PASSWORD="<insert password>"
qrm login --ci --base-url https://example.com
By default, this stores session details at:
~/.config/qrm/login.json
Commands
Check API health
qrm status
Query production test results
By date range
qrm query results --start "2026-03-01T00:00:00Z" --stop "2026-03-01T23:59:59Z"
qrm query results --output json
Retrieves all production test results in the given date range (defaults to today if not specified). Output is a rich table by default, or JSON with --output json. References (operator, station, test program, etc.) are resolved for readability.
First-Pass Yield by Station × Sequence
qrm query fpy
qrm query fpy --start "2026-03-20T00:00:00" --stop "2026-03-26T23:59:59"
qrm query fpy --output json
Computes First-Pass Yield (FPY) grouped by Station and Sequence for the given date range (defaults to the last 7 days). Each row shows Total runs, Passed, Failed, and FPY % for the station/sequence pair. Use --output json for scripting.
Test Duration Statistics by Station × Sequence
qrm query test-duration
qrm query test-duration --start "2026-03-20T00:00:00" --stop "2026-03-26T23:59:59"
qrm query test-duration --output json
Aggregates test duration statistics grouped by Station and Sequence for the given date range (defaults to the last 7 days). Each row shows Count, Min (s), Avg (s), Max (s), and a Short (<10s) counter that flags runs likely to have aborted early or experienced a fixture issue. Use --output json for scripting; the envelope includes start and stop metadata.
By serial number
qrm query serial 326115020010F2F1
qrm query serial 326115020010F2F1 --output json
Retrieves all test results for a given serial number. Output is a rich table by default, or JSON with --output json. References are resolved.
All query subcommands are read-only and accept global options like --config-path, --base-url, --insecure, and --output.
Production Box Management
List production boxes
qrm box list --stop "2026-02-06T23:59:00Z"
If you omit --start, the command defaults to the Unix epoch (1970-01-01T00:00:00Z). Leave --stop out to let QRM use its current time.
Get detailed box information
qrm box get BOX-12345
Shows detailed information about a specific box and lists all items it contains.
Create a production box
qrm box create BOX-12345 \
--started "2026-02-01T00:00:00Z" \
--finished "2026-02-06T23:59:00Z" \
--units 10 \
--shipped
Creates or updates a production box with manufacturing dates and unit count. Use --shipped to mark the box as shipped.
Update an existing box
qrm box update BOX-12345 --units 12 --finished "2026-02-07T12:00:00Z"
Updates properties of an existing production box.
Delete a production box
qrm box delete BOX-12345
Deletes a production box. This command is idempotent and will not fail if the box is already deleted.
Add an item to a box
qrm box add-item BOX-12345 --serial-number "326115020010F2F1"
Adds an item to a production box. You can identify the item by serial number, type name, or identifier tag.
Remove an item from a box
qrm box remove-item BOX-12345 --serial-number "326115020010F2F1"
Removes an item from a production box. Supports serial number, type name, or identifier tag for identification.
Find a box containing a specific item
qrm box find --serial-number "326115020010F2F1"
Searches for the production box containing a specific item by serial number, type name, or identifier tag.
JSON output
Most commands support a JSON output mode.
qrm uut status 326115020010F2F1 --output json
Programmatic use
from qrm.config import load_login_state
from qrm.client import QrmClient
state = load_login_state()
client = QrmClient(base_url=str(state.base_url), verify_tls=state.verify_tls)
uut_runs = client.uut_status(
token=state.token,
serial_number="326115020010F2F1",
start_datetime="2026-02-01T00:00:00Z",
stop_datetime="2026-02-06T23:59:00Z",
max_results=1000,
)
boxes = client.box_list(
token=state.token,
start_datetime="1970-01-01T00:00:00Z",
stop_datetime="2026-02-06T23:59:00Z",
)
# Get detailed box information
box = client.box_get(
token=state.token,
box_identifier="BOX-12345",
)
content = client.box_content(
token=state.token,
box_identifier="BOX-12345",
)
# Create a production box
new_box = client.box_add(
token=state.token,
box_identifier="BOX-12345",
started_datetime="2026-02-01T00:00:00Z",
finished_datetime="2026-02-06T23:59:00Z",
number_of_units=10,
shipped=True,
)
# Delete a production box
result = client.box_remove(
token=state.token,
box_identifier="BOX-12345",
)
# Add an item to a box
result = client.box_uut_add(
token=state.token,
box_identifier="BOX-12345",
uut_serial_number="326115020010F2F1",
)
# Remove an item from a box
result = client.box_uut_remove(
token=state.token,
box_identifier="BOX-12345",
uut_serial_number="326115020010F2F1",
)
# Find which box contains a specific item
box = client.box_find(
token=state.token,
uut_serial_number="326115020010F2F1",
)
FAQ
-
Where is the config kept?
~/.config/qrm/login.json(override withQRM_CONFIG) -
How do I run non-interactively? Make sure to give all required arguments. Also pass
--cito stop output of sensitive information such as username or passwords.
AI assistant integration
lr-qrm ships a bundled skill/instruction file that teaches AI coding assistants
about the CLI commands, Python API, data models, and common workflows.
Run this once from the root of your project:
qrm --install-skill
This does three things:
- Claude Code — copies the skill to
~/.claude/skills/lr-qrm/(global, available in all projects) - GitHub Copilot — writes
.github/instructions/lr-qrm.instructions.mdin the current directory - VSCode — sets
github.copilot.chat.codeGeneration.useInstructionFiles: truein.vscode/settings.json(creates the file if it doesn't exist; merges if it does)
To inspect the skill content without installing:
qrm --show-skill
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lr_qrm-0.4.0.tar.gz.
File metadata
- Download URL: lr_qrm-0.4.0.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d26fe28226a6abc766d6b7b8b48dcc963d87b64ee33a37d38b1fb0c9c785d3e
|
|
| MD5 |
97f72ef925435a831e4c970d474f9c97
|
|
| BLAKE2b-256 |
f832e3c57eb3cf773bbf30875f56b0bd096166a596a209a1cb78728b2c884836
|
File details
Details for the file lr_qrm-0.4.0-py3-none-any.whl.
File metadata
- Download URL: lr_qrm-0.4.0-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c9ef6f8167d1dc269c0584b523da7a160220e79819a3dfb4ff256da5a63aac9
|
|
| MD5 |
daf83740b464c2016641fb0dbea0f9fc
|
|
| BLAKE2b-256 |
285e22bb9107bc524682a443aa7128036061844cfc4a9a9e613066fdea9801f9
|