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.4.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.4.0
File Size Uploaded Provenance Actions
hardlabs_sdk-0.4.0.tar.gz 42.4 kB Without provenance Details for hardlabs_sdk-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 80.0 kB

Release files / hardlabs_sdk-0.4.0.tar.gz

Download URL hardlabs_sdk-0.4.0.tar.gz
Size 42.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1bccfd9464dae7828a5187c0d2eb2d93130ea18071ed23f7f03b578113bea3d7
BLAKE2b-256 checksum
How to use checksums
533f979a5e40f3a163c4bb6d5fdd980f7cd3814149092b8406456d9fc724245f
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.4.0-py3-none-any.whl

Download URL hardlabs_sdk-0.4.0-py3-none-any.whl
Size 37.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8478e0f384f95e4d8e5ab0590de682136fc12b08dd5c919a68856f94f6cffcbf
BLAKE2b-256 checksum
How to use checksums
8ddc9fc77ab41337c35821260f68af4ff8fe5aca5d6910bb228aa1f9df735907
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.4.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