Generate and maintain MicroPython stub files for enhanced IntelliSense and code linting in VSCode, PyCharm, and other modern editors.
MicroPython-Stubber is a Python tool that generates and maintains stub files (PEP 484 type hints) for different MicroPython ports and boards. It solves the problem of missing IntelliSense and code linting in modern editors when working with MicroPython, which uses different modules and APIs than standard CPython. The tool enables autocompletion, parameter hints, and error checking for MicroPython development in editors like VSCode, PyCharm, and Thonny.
MicroPython developers and embedded systems engineers who write firmware code and want enhanced editor support, such as IntelliSense and linting, across various MicroPython ports (ESP32, STM32, RP2) and custom builds.
Developers choose MicroPython-Stubber because it brings the productivity of modern Python IDEs to the MicroPython ecosystem, with automated stub generation for multiple ports, pre-built packages for quick setup, and support for custom firmware—saving time and reducing errors during embedded development.
Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates stubs for native, frozen, and documentation-based modules across multiple ports like ESP32, STM32, and RP2, as highlighted in the 'Stub Generation' and 'Multi-Port Support' features.
Works with VSCode, PyCharm, Thonny, and MyPy to provide IntelliSense and error checking, making it easy to integrate into existing workflows, as noted in the 'Editor Integration' section.
Offers pre-built stubs via PyPI for quick installation, allowing immediate productivity without manual generation, as mentioned in the 'Pre-Built Distribution' feature.
Includes guides for generating stubs for custom MicroPython builds, forks, or branches, catering to specialized firmware needs, as detailed in the 'Custom Firmware Handling' section.
Requires specific setup of VS Code Python extensions and optional Pylint configuration, which can be time-consuming and error-prone for new users, as admitted in the README's configuration steps.
Stubs are generated from documentation, which may be incomplete or outdated for some modules, leading to potentially inaccurate IntelliSense, a limitation inherent in the doc-based approach.
Generating stubs for custom firmware involves multiple CLI commands and manual steps, such as using 'stubber switch', 'docstubs', and 'merge', which can be daunting for casual users.