Skip to main content

HardLabs SDK for Python

Run your tests against a HardLabs simulation of your board, running the firmware you'd flash: its console, its inputs, the values it reports, and its serial ports.

Documentation: https://www.hardlabs.io/docs/sdk/python

pip install "hardlabs-sdk[test]"
npx hardlabs login        # once per computer; in CI, set HARDLABS_TOKEN instead
from hardlabs_sdk import Client

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

With pytest:

def test_overheat_raises_the_alarm(hardlabs_board):
    hardlabs_board.do("temperature-sensor-mcp9808.overheat-75-c")
    hardlabs_board.wait_for("ALARM", within=5)
pytest --hardlabs-sim hardlabs/demo-board

Metadata

Release files for hardlabs-sdk 0.3.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 hardlabs-sdk 0.3.0
File Size Uploaded Provenance Actions
hardlabs_sdk-0.3.0.tar.gz 36.9 kB Without provenance Details for hardlabs_sdk-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hardlabs-sdk 0.3.0
File Interpreter ABI Platform Actions
hardlabs_sdk-0.3.0-py3-none-any.whl Python 3 none any Details for hardlabs_sdk-0.3.0-py3-none-any.whl

Total release size: 71.0 kB

Release files / hardlabs_sdk-0.3.0.tar.gz

Download URL hardlabs_sdk-0.3.0.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
88723bdf6f0dc60bf2e2b7b6e23175643ffe7a6ccefb4d9bd9d8e0b53e26223b
BLAKE2b-256 checksum
How to use checksums
9a270f4b400f80d1c250d71a11a57c16542514f600f4edb124d84449bd0e8fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / hardlabs_sdk-0.3.0-py3-none-any.whl

Download URL hardlabs_sdk-0.3.0-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26e0e6603fd96d88c05c5261084453863279adb115e3166ddb8ef70739f35d23
BLAKE2b-256 checksum
How to use checksums
b491f143dbb7ee50903ad8fc719fa8a17df8110ad3a48c22a97a3303267ee4a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Security for hardlabs-sdk 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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