• Stars
    star
    154
  • Rank 242,095 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stubs of most MicroPython ports, boards and versions to make writing code that much simpler.

micropython-stubs

Documentation Status Star on GitHub All Contributors Black Checked with pyright Checked with pyright

pencil stubs

This repo stores stubs generated by the MicroPython-Stubber tool. Currently over 3.000 stubfiles of multiple MicroPython versionas and modules are available to help you :

  • write code quicker
  • with less errors,
  • get help from code completion,
  • use static type checking,
  • and improve the overall development experience while writing MicroPython.

The stubs are packaged and published to PyPi as Pep 561 stub-only packages to allow them to be installed and used with ease.

Demo using VSCode: demo

To install

  • Install in a typings folder (recommended) pip install -U micropython-<port>[-<board>]stubs --no-user --target ./typings
  • Install in a venv (after activating) pip install -U micropython-<port>[-<board>]stubs --no-user

Examples:

pip install -U micropython-stm32-stubs

# Install stubs for a specific version.
pip install -U micropython-esp32-stubs==1.20.0.*

# Install stubs for a specific board.
pip install -U micropython-rp2-pico_w-stubs

# install to a typings folder (for use without a .venv by pyright or pylance)
pip install -U micropython-rp2-stubs --target typings --no-user

For more details how to use the stubs please refer to the documentation on RTD

Current MicroPython stub packages

You can search for Micropython stub packages on PyPI

For a full overview of all stubs check out the documentation on read the docs, or in docs/firmware_grp.md

Usage statistics

The following graph shows the number of downloads of the stubs from PyPi over time. Im not sure what causes the spikes in downloads, but it is interesting to see that the number of downloads is increasing over time, and some of the spikes have corrolation to the publication of new MicroPython versions.

In addition some tools such as the MicroPico VSCode extension bundle a version of the stubs with their distribution, so the actual usage is higher than the number of downloads.

Contributors

Thanks to everyone that has submitted stubs or other relevant pieces of code and information, or published relevant stubs on pypi or github.

Jos Verlinde
Jos Verlinde

πŸ’» πŸ“ βœ” πŸ”§
MicroPython
MicroPython

πŸ”£ πŸ“
Boris Lovosevic
Boris Lovosevic

πŸ”£ πŸ“
Paul Sokolovsky
Paul Sokolovsky

πŸ”£ πŸ“
pycopy
pycopy

πŸ”£ πŸ“
Pycom
Pycom

πŸš‡
Braden Mars
Braden Mars

πŸ“ βœ” πŸ”§ πŸ“¦
Paul Sokolovsky
Paul Sokolovsky

πŸ“
Daryl Stultz
Daryl Stultz

πŸ“
Patrick
Patrick

βœ” πŸ“
Callum Jacob Hays
Callum Jacob Hays

πŸ’‘ πŸ”¬
Ronald Hiemstra
Ronald Hiemstra

πŸ“ πŸ–‹ πŸ“–
Chris Wood
Chris Wood

πŸ“ πŸ”§
thingslu
thingslu

πŸ“ βœ”
Matin Tat
Matin Tat

βœ”
Roberto Jose Etcheverry Romero
Roberto Jose Etcheverry Romero

βœ”
jdsmith
jdsmith

βœ”
Mr Keuz
Mr Keuz

πŸ’» βœ”
Matt Trentini
Matt Trentini

πŸ“
Andrew St Clair
Andrew St Clair

πŸ“
Michal Moravec
Michal Moravec

πŸ›
Paul
Paul

πŸ”§ πŸ“ πŸ›
Sam Duke
Sam Duke

πŸ›

I invite everyone that has generated stubs for a board or port not on the current list, or has another contribution, to submit the stubs via a pull request or by just zipping up your stubs and creating an issue.

This project follows the all-contributors specification.