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
| Runtime | Microcontrollers | Unix / Linux | Windows | Android | Browser / PWA | Jupyter Notebook |
|---|---|---|---|---|---|---|
| MicroPython | ✅ | ✅ | ✅ | — | ✅ PyScript · PWA · Wokwi | — |
| CircuitPython | ✅ | ✅ | — | — | — | — |
| CPython | — | ✅ | ✅ | ✅ Android APK | — | ✅ Jupyter |
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:
| Backend | Used on | Selected by |
|---|---|---|
BusDisplay | MicroPython / CircuitPython MCUs (SPI / I80) | board config |
FBDisplay | CircuitPython framebuffer displays (RGB, USB video) | board config |
SDLDisplay | CPython, MicroPython Unix, CircuitPython Unix (SDL2); Android APK; Linux KMS | auto / board_configs/sdldisplay/ · sdldisplay/linux_kms/ |
WinDisplay | Windows CPython (native Win32 via uwin32) | auto (first on win32) / board_configs/windisplay/ |
PGDisplay | CPython desktop (PyGame) | auto / board_configs/pgdisplay/ |
PSDisplay | PyScript browser canvas and PWAs | auto |
JNDisplay | Jupyter Notebook | auto |
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
- MicroPython — MCUs, Unix, Windows, bus drivers, frozen firmware.
- CircuitPython — MCUs and Unix;
framebufferioand theframebufshim. - CPython desktop — SDL2 / PyGame setup for Linux, macOS, and Windows.
- Android — CPython APK builds with python-for-android and buildozer.
- Progressive Web Apps (PWA) — where installable PyScript apps run (desktop, Android Chrome, iOS, TVs).
- Jupyter Notebook — interactive display widget and async execution model.
- Run the notebook interactively — JupyterLab / VS Code setup (the RTD notebook page is static).
- PyScript — running in the browser (
PSDisplay).
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.