Skip to main content

Micropython Stubs for Pimoroni MicroPython libraries for RP2040-based boards

Project description

Pimoroni Pico MicroPython Stubs

This repository contains type stubs that help you write code for Pimoroni Pico MicroPython's many built-in modules.

Type stubs include details about the constants, functions, classes and methods available in each module, and what arguments they accept.

VSCode Setup

Required Extensions

You must install the VSCode Python extension and additionally Pylance to support type hints.

To install extensions, press Ctrl+Shift+P or Cmd+Shift+P and in the pop-up box type "Extensions" and select "Extensions: Install Extensions".

A search box should open on the left-hand side of your editor, find and install the following:

VSCode Settings

To open VSCode settings press Ctrl+Shift+P or Cmd+Shift+P and in the pop-up box type "Settings" and choose "Preferences: Open Workspace Settings (JSON)".

If the file is empty you can go right ahead and add the lines below:

{
    "python.languageServer": "Pylance",
    "python.analysis.typeCheckingMode": "basic",
    "python.analysis.diagnosticSeverityOverrides": {
        "reportMissingModuleSource": "none"
    },
    "python.analysis.typeshedPaths": [
        "./typings/",
    ],
}

MicroPython stubs

To get MicroPython type hints you'll need to install the following package into the ./typings directory of your project.

If the terminal is not open press Ctrl+Shift+P or Cmd+Shift+P and in the pop-up box type "Terminal" and select "Terminal: Create New Terminal (In Active Workspace)".

Finally in the terminal run the following command:

pip install pimoroni-pico-stubs --target ./typings --no-user

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

north101_pimoroni_pico_stubs-1.22.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file north101_pimoroni_pico_stubs-1.22.0.tar.gz.

File metadata

File hashes

Hashes for north101_pimoroni_pico_stubs-1.22.0.tar.gz
Algorithm Hash digest
SHA256 414b8cf3b9ef17c36579a780d06efc7b4fc3f9c386d7db4d14f24cbbd84fe8c4
MD5 c4c32fae43c59e516f6039325d6a509b
BLAKE2b-256 19eb404aa8352ba26e561a1cb29c63eed0521223c7861172c88fb5c78dc5c5ca

See more details on using hashes here.

File details

Details for the file north101_pimoroni_pico_stubs-1.22.0-py3-none-any.whl.

File metadata

File hashes

Hashes for north101_pimoroni_pico_stubs-1.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1eab233fffabd5a2d0ebd1c7b667707ecc8e3f560b774e489fe5acf13f730c50
MD5 8d8ddd59f3a86f9fb8567ff576d6668f
BLAKE2b-256 618d70ceb8055a7aaa9c634eac5069d396506e5be676f4c266c3fee3174c4036

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page