Portability & platforms

August 12, 2026 · View on GitHub

Portability is PyDevices's defining feature. Write your display, input, and timing code once against board_config, and it runs unchanged across every supported runtime and target below. This page is the single home for the platform matrix; each row links to platform-specific notes.

Where PyDevices runs

RuntimeMicrocontrollersUnix / LinuxWindowsAndroidBrowser / PWAJupyter Notebook
MicroPythonPyScript · PWA · Wokwi
CircuitPython
CPythonAndroid APKJupyter

Installable browser apps: the PyScript gallery ships as a Progressive Web App — install it on desktop Chromium, Android Chrome, or iOS home screen. That is a major distribution path, not a demo-only trick. See where PWAs run.

How portability works

The same import works on every platform:

from board_config import display_drv
from app_runtime import runtime

What changes is which display backend is used — displaydev.auto.AutoDisplay on desktop / PyScript / Jupyter (via the desktop board_config), or an explicit per-board config on hardware:

BackendUsed onSelected by
BusDisplayMicroPython / CircuitPython MCUs (SPI / I80)board config
FBDisplayCircuitPython framebuffer displays (RGB, USB video)board config
SDLDisplayCPython, MicroPython Unix, CircuitPython Unix (SDL2); Android APK; Linux KMSauto / board_configs/sdldisplay/ · sdldisplay/linux_kms/
WinDisplayWindows CPython (native Win32 via uwin32)auto (first on win32) / board_configs/windisplay/
PGDisplayCPython desktop (PyGame)auto / board_configs/pgdisplay/
PSDisplayPyScript browser canvas and PWAsauto
JNDisplayJupyter Notebookauto

Input is just as portable: a mouse on the desktop, a finger on a touchscreen, and a tap in the browser all arrive as the same events. Timers come from multimer, which picks a backend (machine.Timer, librt, win32, threads, polling, SDL, or asyncio) to suit the host.

See Displays for backend details and Architecture for how the pieces fit together.

Platform notes

Build GUIs across platforms

Because the backend is portable, anything built on PyDevices inherits that portability — including the LVGL sister projects for MicroPython, CircuitPython, and CPython. You can even prototype an LVGL app in Jupyter and run it unchanged on a microcontroller.