pybricksdev
is open source software and we welcome contributions.
This is the preferred workflow that we support. If you have other tools you like to use, you are welcome to use them, but we can't help you if things go wrong.
- Git (or install
git
with your favorite package manager) - Python (see README for more info)
- Poetry
- VS Code
After installing the prerequisites, use a command prompt in the location of your choice to run the following:
git clone https://github.com/pybricks/pybricksdev
cd pybricksdev
poetry env use python3.12
poetry install
code .
On Windows, you may need to use the full path to python3.12
(run py -0p
to find it).
You will need to tell VS Code to use .venv
as the Python interpreter. It
should ask you about this the first time you open the project folder.
You should also opt into the DeprecatePythonPath experiment for the Microsoft
Python VS Code extension so that it does not modify the .vscode/settings.json
file in the project when you select the interpreter.
poetry run pybricksdev run ble test.py
poetry build
pipx install --force ./dist/pybricksdev-1.0.0a19.tar.gz
For instance, if you want the installed pybricksdev
to use code from the develop
branch of the bleak
package.
pipx inject pybricksdev https://github.com/hbldh/bleak/archive/refs/heads/develop.zip