| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Documentation • PyScript gallery • Product packages • Screenshots
![]() |
![]() |
|---|---|
| paint.py | tiny_toasters.py |
This repository is the examples, integration documentation, and browser gallery for the PyDevices driver ecosystem. The reusable product source lives in pydevices:
Those libraries are designed to work across MicroPython, CircuitPython, and CPython on microcontrollers, Linux, Windows, Android, browsers, and notebooks. This repo demonstrates that portability; it is not the package source of truth.
Alpha quality. The organization is being prepared for its first external users, so names and APIs may still evolve.
The fastest route is the interactive PyScript gallery. It runs the real examples directly in a modern web browser. To start a standalone browser app or offline PWA, use the pyscript-template.
For a desktop clone:
git clone https://github.com/PyDevices/pydevices-examples.git
cd pydevices-examples
python3 -m venv .venv
.venv/bin/pip install --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ -r requirements.txt
cd lib
../.venv/bin/python examples/pydevices_demo.pyOn Windows, use the equivalent .venv\Scripts\python.exe commands.
For MicroPython, install unprefixed MIP package names from the PyDevices PyDevices MIP index, then install a board package:
import mip
INDEX = "https://PyDevices.github.io/mip"
mip.install("pydevices", index=INDEX) # displaydev, appdev, and the rest of lib/See the pydevices install workflows and board configs for complete device setup.
Board configs describe hardware. They export neutral pieces such as display_drv, touch_read, host_read, and timer_async; they do not create an application-level appdev.App.
Non-LVGL examples in this repo opt into the optional appdev coordinator:
import board_config
from board_config import display_drv
import appdev
app = appdev.App(board_config)The app keeps itself alive past the end of the script, so no trailing app.run() is needed. Call it only when you want the script to block at that point, or need a nonzero exit code.
LVGL examples use the coordinator bundled with the LVGL binding and do not import appdev:
from board_config import display_drv
from display_driver import appThis separation keeps hardware policy out of board configs and lets applications provide a different event loop or traffic controller when appropriate.
Python distributions on TestPyPI use the organization prefix; imports and MIP packages remain conventional and unprefixed. pydevices ships all of the core lib/ tree as one distribution -- MIP publishes those components separately, because installing only what a board needs matters there.
| TestPyPI distribution | Python import / MIP name |
|---|---|
| pydevices | displaydev, audiodev, appdev, events, keys, multimer, boarddev |
| pydevices-pygraphics | pygraphics |
| pydevices-palettes | palettes |
| pydevices-pdwidgets | pdwidgets |
| pydevices-lvgl | lvgl |
| Path | Purpose |
|---|---|
| lib/examples/ | Portable examples and complete demo applications |
| lib/utils/ | Example helpers and third-party GUI adapters |
| .site/pyscript/ | PyScript gallery and browser demo runners |
| docs/ | Peter Hinch GUI integration, the TFT GUI stub, and screenshots |
| tools/ | Cross-interpreter example and LVGL test harnesses |
| packages/ | GitHub MIP manifests for examples and helpers |
.venv/bin/python -m unittest discover -s tests
.venv/bin/python -m pytest -s tests -q
.venv/bin/ruff check lib tests tools scriptsSee AGENTS.md and tools/README.md for the cross-interpreter example matrix. Contributions to reusable libraries and hardware support belong in pydevices; examples, integrations, and gallery work belong here.
MIT. See LICENSE.
| Back | FazBrowse Home | New Git URL |