Glossary¶
This glossary defines common terms used throughout the MicroPython Stubber documentation.
General Terms¶
Board : A physical microcontroller development board (e.g., ESP32, Raspberry Pi Pico, PyBoard) that runs MicroPython firmware.
CPython : The reference implementation of Python, typically running on desktop/server systems. Different from MicroPython in available modules and memory constraints.
Firmware : The MicroPython software that runs on a microcontroller board. Different firmware versions support different modules and features.
Firmware ID
: A unique identifier for a specific firmware build, typically including family, version, and port (e.g., micropython-v1.22.2-esp32).
IDE : Integrated Development Environment - a software application providing comprehensive facilities for software development (e.g., VS Code, PyCharm).
IntelliSense : Microsoft’s code completion, parameter info, quick info, and member lists feature in VS Code and other editors.
MCU : Microcontroller Unit - the chip that runs MicroPython firmware as part of a product or on a development board.
Port : A version of MicroPython adapted for a specific microcontroller family or platform (e.g., esp32, rp2, stm32).
REPL : Read-Eval-Print Loop - the interactive MicroPython prompt where you can type commands and see immediate results.
Tools and Commands¶
createstubs.py : The main script that runs on MicroPython devices to generate stub files by introspecting available modules.
mpremote : A command-line tool for interacting with MicroPython devices over serial connections.
Pylance : Microsoft’s Python language server that provides IntelliSense, type checking, and other language features in VS Code.
stubgen : A tool (part of mypy) that automatically generates stub files from Python source code.
stubber : The main command-line interface for MicroPython Stubber, providing various subcommands for stub generation and management.
File Extensions and Formats¶
.py Files : Regular Python source code files containing implementation.
.pyi Files : Python stub files containing only type information and interface definitions, no implementation.
modules.json : A manifest file containing metadata about generated stubs and the device they were created on.
MicroPython-Specific Terms¶
sys.implementation : A Python module attribute that provides information about the Python implementation (name, version, etc.).
sys.uname() : A MicroPython function that returns system information including platform, architecture, and version details.
upip : MicroPython’s package installer (predecessor to mip).
mip : MicroPython’s modern package installer for installing packages from PyPI or other sources.
Flash Memory : Non-volatile storage on microcontroller boards where firmware and frozen modules are stored.
SD Card : External storage that can be used with some MicroPython boards for additional file storage.
Development Workflow Terms¶
Clone : To create a local copy of a Git repository, typically the MicroPython source code repositories.
Repository (Repo) : A Git repository containing source code, typically hosted on GitHub.
Switch : To change between different versions, branches, or commits in a Git repository.
Merge : To combine different types of stub files (doc, frozen, MCU) into a unified set.
Build : To create distributable packages from stub files for publication to PyPI.
Publish : To upload stub packages to PyPI or other package repositories.
Version : A specific release or commit of MicroPython firmware (e.g., v1.22.2, stable, preview).
Configuration Terms¶
pyproject.toml : A configuration file used by modern Python tools including Poetry for project metadata and dependencies.
Pylint : A Python static code analysis tool that looks for programming errors, helps enforce coding standards, and suggests refactoring.
Type Checking : The process of verifying that code uses types consistently and correctly, typically done by tools like mypy or Pylance.
Workspace : A VS Code concept representing a folder or set of folders that contain your project files and configuration.
Error and Debugging Terms¶
Memory Allocation Bug : A specific issue in MicroPython 1.13.0 that prevents stub generation from working properly.
NotImplementedError : A Python exception raised when attempting to use functionality that isn’t available or implemented.
Problematic Modules : MicroPython modules that cannot be safely introspected for stub generation due to side effects or system requirements.
Excluded Modules : Modules that are intentionally skipped during stub generation because they provide no useful type information.
This glossary is maintained as part of the MicroPython Stubber documentation. Terms are added and updated as the project evolves.