Micropython-Stubs
main
Contents:
Micropython-Stubs
Using the MicroPython stubs
VSCode and Pylance or Pyright
PyCharm
Pylint
MyPy - limited functionality
Legacy installation
Create a symbolic link
Stub index
List of available packages
Stubs by family and version
All stubs by type
Micropython-Stubs
Welcome to the MicroPython Stubs collection
Edit on GitHub
Welcome to the MicroPython Stubs collection
¶
Contents:
Micropython-Stubs
Installable stub packages
Stub Types
Using the MicroPython stubs
Determine the version and port
Create and activate a venv
Install the stub packages to your system
Install into a
venv
Install into a
typings
folder.
Configure your IDE (or other tools) where the stubs are located
VSCode and Pylance or Pyright
Install the stubs from PyPi.
Configure VSCode & Pylance.
Install the Python and Pylance extensions.
Select the correct Python environment.
Set Pylance as the language Server.
Add configuration to suppress unneeded warnings.
Configure Pylance to read MicroPython stdlib stubs.
Sample VSCode configuration file.
PyCharm
Configure PyCharm to use the selected stub folders
Install the stubs from PyPi.
Check library imports
Disable Pycharm warnings for RP2 PIO code
Legacy configuration: Clone the stubs repo
Verify the paths
Pylint
Pylint dos not support stub-only packages.
Pylint:Legacy configuration.
MyPy - limited functionality
MyPy and stub-only packages installed in a virtual environment
MyPy and stub-only packages installed in a
typings
folder
Workarounds for some mypy warnings and errors
Legacy installation
Clone or download a copy of the Micropython-Stubs repo
Project configuration
Create a symlink to the stubs folder
Quick start:
Select which stub folders you need to reference
Clone the stubs repo
Configure VSCode & Pylance to use the selected stub folders
legacy resolving order
Restart VSCode
Order of the stub folders
Create a symbolic link
Windows 10 / 11
Powershell
mklink
Linux/Macos/Unix
Stub index
List of available packages
Packages on PyPi
Packages on GitHub
List of current firmwares and stubs
Stubs by family and version
Micropython
Loboris
Lvgl
M5stack
Pyb
Pycopy
Ulab
Metrics
All stubs by type
Indices and reference
¶
Index
Search Page
Read the Docs
v: main
Versions
latest
main
doc_update
Downloads
pdf
On Read the Docs
Project Home
Builds