PyDevices

One Python for screens, sound and USB that runs the same on a microcontroller, on your desktop and in a browser tab.

MicroPython CircuitPython CPython WebAssembly Alpha

PyDevices is a set of libraries and firmware for people who build things with displays, touch, sound and USB in Python. You write your drawing, widgets and audio code once and run it on a microcontroller board, as a desktop program, inside a web page, or on Android.

This site is the front door to the documentation of every PyDevices project. Each project has its own manual, and the bar at the top of every page takes you to any of them. If you are new, start with the newcomer’s guide; if you want something on your machine, install it.

The projects

palettes

Color palettes: an HSV wheel, RGB cubes, Material Design swatches and RGB565 helpers.

https://palettes.readthedocs.io/
pygraphics

2D drawing, bitmap fonts and blitting, in C and in Python.

https://pygraphics.readthedocs.io/
pdwidgets

Buttons, sliders, labels and screens for touch displays, in pure Python.

https://pdwidgets.readthedocs.io/

Every project, including the ones whose manual is still a README on GitHub, is listed in Projects.

Try it before you install it

The gallery runs the same example programs that run on boards, in your browser, and Workbench is an editor with a simulated board built in. The main page of each project here also carries a live demo you can edit and run.