Skip to main content

A stubs package to write EV3 Python code.

Project description

pybricks-stubs

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.

Disclaimer

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

Issues

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.

Source Distribution

pybricks-stubs-2.0.2.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

pybricks_stubs-2.0.2-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file pybricks-stubs-2.0.2.tar.gz.

File metadata

  • Download URL: pybricks-stubs-2.0.2.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pybricks-stubs-2.0.2.tar.gz
Algorithm Hash digest
SHA256 66620551327e7c373063505ba1187baa2c09d493c2cdbb0ddcf9365e59ca05ad
MD5 511fabb960b5bc3ddb739002a039c90a
BLAKE2b-256 664f66c9e7eb08e20748b8f6df948c092a602d523ee5d5025aa396ede6e35001

See more details on using hashes here.

File details

Details for the file pybricks_stubs-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: pybricks_stubs-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pybricks_stubs-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c156a1a84f2d2af933eefd79a4123fbacfedad341972e1b32cc56c9947e76f30
MD5 7244ade68158a4b8570dcfa5f936a1ba
BLAKE2b-256 646ea448b75fc3a308a547e7799bc1d7b1c21835a238f794848f4fbb7e6c539e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page