Skip to main content

A stubs package to write EV3 Python code.

Project description


Package Rationale

This package is meant to provide typings (and IntelliSense) to those developing Python programs for the LEGO® MINDSTORMS® EV3 with the official LEGO® software (pybricks).

This package does not support executing robot code on the computer or on the robot. This package does provide type hinting while writing Python code on the computer for later upload/deployment to the robot.

Version Documentation

For version 1.0.0 and earlier, all typings are based on the LEGO® API 1.0.0.

For versions after 1.0.0 (including 2.0.x and the 1.0.* pre-releases for 2.0.0), all typings are based on the LEGO® API 2.0.0.

Choosing Your Version

For the latest version, you can run:

pip install pybricks-stubs

If you are working with version 1.0.0 from LEGO®, make sure you install version 1.0.0 of the package with this command:

pip install pybricks-stubs==1.0.0

Turning On Type Hints

If you are working with version 2.0.0 or later and have generated a project using the Visual Studio Code extension, you may need to edit your settings file in order for your hints to work.

If so, you would go to the .vscode folder to the settings.json file. You will want to edit this line:

"python.languageServer": "None"

Just change "None" to "Microsoft" or "Jedi" (either should work). You will have to reload the project. Follow the prompts or close Visual Studio Code and re-open the project.

Be aware that things your computer lets you import may not be available on the EV3's local version of Python. Make sure you check that your code runs on the brick whenever you import something new.


This package is not produced or maintained by LEGO®, nor is it officially endorsed by LEGO® or FIRST®.


Please report any issues you encounter on the GitHub page.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pybricks-stubs, version 2.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pybricks_stubs-2.0.2-py3-none-any.whl (45.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pybricks-stubs-2.0.2.tar.gz (27.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page