Braden Mars' Micropy Cli Brings Microsoft's Visual Studio Code IDE to Bear on MicroPython Projects
Handy tool lets MicroPython developers access all the usual features of VS Code, including autocompletion and dependency handling.
Developer Braden Mars is looking to make it easier to build and maintain MicroPython projects in Microsoft's popular Visual Studio Code (VS Code) integrated development envionrments (IDE), using a tool he's dubbed Micropy Cli.
"Micropy Cli is a project management/generation tool for writing MicroPython code in modern IDEs such as VSCode," Mars explains of his creation, brought to our attention by Adafruit. "Its primary goal is to automate the process of creating a workspace complete with: linting compatible with MicroPython; VSCode IntelliSense; autocompletion; dependency management; VCS [Version Control System] compatibility."
MicroPython, a variant of the popular Python programming language specifically tailored for resource-constrained microcontrollers, is often used in small-scale single-file projects ā but can also be used in bigger, more complex creations. It's here that Micropy Cli is likely to appeal, offering the ability to use Visual Studio Code's project-handling capabilities for MicroPython projects.
"Currently, handling dependencies with MicroPython is a bit tricky," Mars claims. "Maybe you can install a cpython version of your requirement? Maybe you could just copy and paste it? What if it needs to be frozen? Micropy handles all these issues for you automatically. Not only does it track your project's dependencies, it keeps both requirements.txt and dev-requirements.txt updated, enables autocompletion/IntelliSense for each dep[endency], and allows you to import them just as you would on your device."
More information on the project is available on GitHub, where the source code is published under the permissive MIT license.