SDK docs menu

Python SDK

Boot a simulation of your board with your firmware, and test it from Python: its console, its inputs, the values it reports, and its serial ports.

pip install "hardlabs-sdk[test]"
from hardlabs_sdk import Client

with Client().start("company_name/board_name", "build/app.elf") as board:
    board.wait_for("app ready", within=5)
    board.do("bench-supply.volts", 11.5)
    assert board.read("power-monitor.bus-current") < 0.2

Two ways to use it

Drive the board from your tests.Change its inputs, read what its panels show, type into the firmware's console and wait for output. Waits count simulated time. Start with the Quickstart.

Keep your existing test framework.If your tests talk to the device over a serial port, the SDK opens the simulated board's port on your computer and your framework opens it with serial_for_url. See Using your own test framework.

Documentation