Getting started
Installation
Install the package
The SDK needs Python 3.9 or later.
pip install "hardlabs-sdk[test]"The test extra installs pytest and pyserial as well. Leave it out (pip install hardlabs-sdk) if you only script the board. The package is hardlabs-sdk on PyPI.
Authenticate
On your own computer, sign in once with the HardLabs CLI. This needs Node.js 18 or later. The SDK uses the token the CLI saves.
npx hardlabs loginIn CI, or without Node, create a token on hardlabs.io under Settings → CLI access and set it as HARDLABS_TOKEN. You can also pass a token to Client directly:
import os
from hardlabs_sdk import Client
client = Client(token=os.environ["MY_HARDLABS_TOKEN"])Check the setup
List the boards your account can open:
python -m hardlabs_sdk simsEvery account includes hardlabs/demo-board, which the quickstart uses. No account yet? Request a pilot.