Skip to content

Python ​

The Aidlab Python SDK connects Python apps on Windows, macOS and Linux to Aidlab, Aidlab 2 and Aidmed One. It requires Python 3.10 or newer and a Bluetooth 4.0+ adapter.

Installation ​

Install the SDK into a virtual environment. Some Python distributions, such as Homebrew Python, reject global pip installs.

bash
python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
python -m pip install aidlabsdk

On macOS, allow Bluetooth access for the app that runs Python, such as Terminal or your IDE, in System Settings → Privacy & Security → Bluetooth.

Logging ​

To enable SDK or BLE diagnostics, configure Python logging in your app:

python
import logging

logging.basicConfig()

# Show Aidlab SDK diagnostics; commands and BLE frames are logged at DEBUG level
logging.getLogger("aidlab").setLevel(logging.DEBUG)

# Optional: silence verbose Bleak output
logging.getLogger("bleak").setLevel(logging.ERROR)