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.1.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

pybricks_stubs-2.0.1-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybricks-stubs-2.0.1.tar.gz
  • Upload date:
  • Size: 27.1 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.1.tar.gz
Algorithm Hash digest
SHA256 a6269317a6c88586d8f138585ead8f71bb1eaf16558ee29722ae959df7b17b35
MD5 8a8a7e6e2fa20b4f3af8a1e23812f67a
BLAKE2b-256 6361f955b649dc6205d8c437fc94d97bb846f9b96c1c0e2eedd6b026777b2fcf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybricks_stubs-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 45.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35a8fe42c4d350cadef5b0089bfb5d4dd1c630a5d4e22c014ea7a4c675a23812
MD5 3f7c9ce553ae4392182cdbd25939c804
BLAKE2b-256 ead9222f49e71c0019fd7d64b9035b215e1b80f6bf0b6b7629f792929da77fb7

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