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 a final 2.0.0 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.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

pybricks_stubs-2.0.0-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pybricks-stubs-2.0.0.tar.gz
Algorithm Hash digest
SHA256 743363491423504fa3ea374adbab9268d6cd638e23851e646d8702bcb4e4652c
MD5 657bcd4ef7f1b572f8ba13a54add85f0
BLAKE2b-256 127f769db125dc52649c987b1e3b8b0b5eb7ee1cb30d1e468f393161ffc91573

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybricks_stubs-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 43.8 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/40.5.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

File hashes

Hashes for pybricks_stubs-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77e45fc9b277e8a126834dbe89330f2a44d7c50a48a5639ba6fb54ba3657ff8e
MD5 982bb8fdde59eab9aec2fa94d331478c
BLAKE2b-256 104b08a6a24929516080d8d75ff169cab984b75b670b7c00133d74782354d922

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