Skip to main content

lvgl-python

Native CPython extension for LVGL, generated from lvgl-bindings with no MicroPython interpreter.

This is the publishing endpoint in the LVGL family: it turns synced bindings into versioned pydevices-lvgl wheels on TestPyPI. See lvgl-bindings — The LVGL family for how the family fits together.

Pip name: pydevices-lvgl · Import: import lvgl as lv

import lvgl as lv
# import display_driver  # optional; needs a PyDevices board_config

Install

Prebuilt wheels are published as pydevices-lvgl on TestPyPI (import as lvgl). CI builds a separate wheel for each CPython minor (3.10–3.14) on Linux x86_64 and Windows x64, Android wheels for 3.13–3.14 (android_21_arm64_v8a, android_21_x86_64 per PEP 738; cibuildwheel has no armeabi_v7a yet), plus a Pyodide pyemscripten_2026_0_wasm32 wheel (cp314) — pip/micropip select the tag that matches your interpreter.

Android (python-for-android / PyDevices): install the matching wheel from TestPyPI when building an APK, or let the pydeviceslvgl p4a recipe fetch it (see android-template):

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ \
  --only-binary=:all: --platform android_21_arm64_v8a pydevices-lvgl
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-lvgl

Pyodide / micropip (browser WASM; same project):

import micropip
await micropip.install("pydevices-lvgl", index_urls="https://test.pypi.org/simple/")

Pin a release:

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-lvgl==9.5.25

--extra-index-url https://pypi.org/simple/ lets pip fetch dependencies (e.g. setuptools) from PyPI. Use the same pip / python you will run (e.g. pip.exe with Windows 3.14).

Quick check:

python -c "import lvgl as lv; lv.init(); lv.deinit(); print('ok')"

WSL + Windows Pythonpip.exe / python.exe on PATH:

pip.exe install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-lvgl==9.5.25
python.exe -c "import lvgl as lv; lv.init(); lv.deinit(); print('ok')"

To build from source instead, see building.md.

Usage

1. PyDevices Standard Quickstart (Recommended)

When using pydevices board configs, display_driver sets up the display, input devices, and background timer automatically:

import display_driver  # noqa: F401 - initializes display, input, and timer
import lvgl as lv
from display_driver import app

scr = lv.screen_active()
label = lv.label(scr)
label.set_text("Hello from PyDevices LVGL!")
label.center()

# Standalone scripts: keep the process alive
# Interactive REPL (python -i): app.run() returns immediately so the prompt is usable!
app.run()

2. Standalone Raw LVGL Setup (Custom backends)

For custom setups without a pydevices board config:

import lvgl as lv

lv.init()

disp = lv.display_create(240, 240)
lv.display_set_color_format(disp, lv.COLOR_FORMAT.RGB565)
buf = lv.draw_buf_create(240, 240, lv.COLOR_FORMAT.RGB565, 0)
lv.display_set_draw_buffers(disp, buf, None)
lv.display_set_render_mode(disp, lv.DISPLAY_RENDER_MODE.PARTIAL)

scr = lv.screen_active()
label = lv.label(scr)
label.set_text("Hello")
print(label.get_text())

def on_clicked(event):
    print("clicked", event.get_code())

scr.add_event_cb(on_clicked, lv.EVENT.CLICKED, None)
scr.send_event(lv.EVENT.CLICKED, None)

lv.deinit()

Type checking

Wheels install lvgl.pyi next to the lvgl extension module. For editable builds, pip install -e . copies generated/lvgl.pyi at build time.

If your checker does not pick it up, set python.analysis.stubPath (Pylance) or stubPath (pyright) to a directory containing lvgl.pyi, or symlink typings/lvgl/__init__.pyi to this repo’s vendored generated/lvgl.pyi.

API style

The binding follows the same naming as the MicroPython port where possible:

Pattern Example
Module constants lv.SYMBOL_OK, lv.EVENT.CLICKED
Enum namespaces lv.COLOR_FORMAT.RGB565, lv.DISPLAY_RENDER_MODE.PARTIAL
Widget types (callable) lv.obj(), lv.label(parent), lv.button(parent)
Object methods label.set_text("…"), scr.add_event_cb(cb, lv.EVENT.CLICKED, None)
Module functions lv.display_create(240, 240), lv.screen_active()
Struct methods event.get_code() on lv_event_t wrappers
Module-level struct helpers lv.event_get_code(event) (same as MP module API)

Display configuration uses module-level functions (lv.display_set_flush_cb, etc.), not methods on a display object.

Limitations

  • Displays use module functions, not methods. After disp = lv.display_create(...), configure the display with calls like lv.display_set_flush_cb(disp, cb) — not disp.set_flush_cb(cb).
  • Prefer module functions if a widget method acts wrong. Some widgets share similar LVGL internals, so an occasional method on one widget type may not map to the function you expect. If something looks off, try the matching lv.* module function (same name as in the LVGL C API).
  • Low-level pointer helpers are incomplete. A few advanced pointer utilities are not fully exposed in Python yet; the binding uses a small placeholder where needed.
  • Keep widgets alive while they have callbacks. When you call add_event_cb(handler, ...) with user_data=None, the binding stores your handler on that widget. If Python garbage-collects the widget while LVGL still uses it, the callback can stop working. Hold a reference (e.g. keep it in a variable or list) for as long as the callback should run. Callbacks are removed when you delete the event or destroy the widget.

Links

License

MIT — see LICENSE.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pydevices_lvgl-9.5.37-cp314-cp314-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.14Windows x86-64

pydevices_lvgl-9.5.37-cp314-cp314-pyemscripten_2026_0_wasm32.whl (502.8 kB view details)

Uploaded CPython 3.14PyEmscripten 2026.0 wasm32

pydevices_lvgl-9.5.37-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pydevices_lvgl-9.5.37-cp314-cp314-android_21_x86_64.whl (1.1 MB view details)

Uploaded Android API level 21+ x86-64CPython 3.14

pydevices_lvgl-9.5.37-cp314-cp314-android_21_arm64_v8a.whl (1.0 MB view details)

Uploaded Android API level 21+ ARM64 v8aCPython 3.14

pydevices_lvgl-9.5.37-cp313-cp313-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.13Windows x86-64

pydevices_lvgl-9.5.37-cp313-cp313-pyemscripten_2025_0_wasm32.whl (503.3 kB view details)

Uploaded CPython 3.13PyEmscripten 2025.0 wasm32

pydevices_lvgl-9.5.37-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pydevices_lvgl-9.5.37-cp313-cp313-android_21_x86_64.whl (1.1 MB view details)

Uploaded Android API level 21+ x86-64CPython 3.13

pydevices_lvgl-9.5.37-cp313-cp313-android_21_arm64_v8a.whl (1.0 MB view details)

Uploaded Android API level 21+ ARM64 v8aCPython 3.13

pydevices_lvgl-9.5.37-cp312-cp312-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.12Windows x86-64

pydevices_lvgl-9.5.37-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pydevices_lvgl-9.5.37-cp311-cp311-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.11Windows x86-64

pydevices_lvgl-9.5.37-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pydevices_lvgl-9.5.37-cp310-cp310-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.10Windows x86-64

pydevices_lvgl-9.5.37-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file pydevices_lvgl-9.5.37-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 488663a2d076fc33dfe083bb2c9c4ff37740903fb6759f7c5047179f864c92e5
MD5 1a07eedeb338eb26d7b7c7dfcb293165
BLAKE2b-256 5f3322e9d01da38b22b434c27f876ab95114d4f9fbd6194df8930a8d9d77be9e

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp314-cp314-pyemscripten_2026_0_wasm32.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 729bdb36f9bdb8c51bc5bbc646980274688f37dbbe43da5b110db3d075854eb8
MD5 961704cfef662b7e69ca4b6a53e84dd6
BLAKE2b-256 367bee210f1af28a1a8f469201702a29996ef0f774093635be638f68be5c572f

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b664e2eb6704937cfe7da4636c42cc09e4d00f57e34128880f3fd5be2ed9d043
MD5 fda8826d47374369ffa46e89a0ceffcb
BLAKE2b-256 049df7079a1fe353661dbaf761465f90407463b8f97d5a3ac4e5d8ef06328f21

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp314-cp314-android_21_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp314-cp314-android_21_x86_64.whl
Algorithm Hash digest
SHA256 5b1ea95347c986a25aa12364a910f4ecaa0233099539bb8adfb039afebf42238
MD5 58562cf9ec4af98d98b78e90b05c85d2
BLAKE2b-256 ca7b9a41f9c768cecf51b93fe76ce2db848ede1f187df1dc5efc9bd7f506ee30

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp314-cp314-android_21_arm64_v8a.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp314-cp314-android_21_arm64_v8a.whl
Algorithm Hash digest
SHA256 55eb9e61704f21c114694af428fd1db65ccc474629fac8259eaad73297dc1bb7
MD5 ad2c351dec1b938bc8bc3ef37b21d378
BLAKE2b-256 2f723f8f27664000664230019eb7248e90d7d26c6de86b1a75138bb0e7b83946

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1719847851daa280d6417dc9aa9ad5f65bb32d8f9ab756fe0c1ef5481a776cdc
MD5 5151d4fdfd39e6ae539ec058e77a2057
BLAKE2b-256 027fc7442568b747269f1b3c0c6615fcf1c255fe602449e1817350ec8a0b13fe

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp313-cp313-pyemscripten_2025_0_wasm32.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp313-cp313-pyemscripten_2025_0_wasm32.whl
Algorithm Hash digest
SHA256 07079b7257a5d45bfa8676aad9cd29e08421bf41a4cc2a8be38b94691b2009be
MD5 ffaee1e66c47c3d259d57d30fcda0f3b
BLAKE2b-256 c3d06839edf34c57694dc9719d738692c84adc2bfda0cf002ea2283185395688

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d16815d29b9f8bd641c67263808d2cf9d7d3fab5a19daef487ba1a5aa251b93
MD5 97a867cb90b04941d1f559a74da20cee
BLAKE2b-256 2751b92838ff3c7662740ed60274e7df7c72028098ee83e294a89d1bf3f38b5a

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp313-cp313-android_21_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp313-cp313-android_21_x86_64.whl
Algorithm Hash digest
SHA256 9eb29b1aa67927d484a227d7bf43d88afb2e3d32d8f91bf5454939a5330fa498
MD5 ffc447acdfa6180070fee9eb2ec39442
BLAKE2b-256 50f8a4e7d5885f5b187f47b8e05e5e38f6f097c542cb00caa4a4216250bf4b42

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp313-cp313-android_21_arm64_v8a.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp313-cp313-android_21_arm64_v8a.whl
Algorithm Hash digest
SHA256 e7453486e888702f6a935065201173b24c452fbbe657538e9634a438f3205b3e
MD5 79034c710209f95cdbedb86722b8504d
BLAKE2b-256 3870619445c473eaed2a53d7433e58e0c518faed7b08ec463c5cfb6119fab1fe

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4e6287274a82d081aaaea610ad3327b2742c503b7a2d3e540262d09c335d3e6e
MD5 12119848dd80bec068bbc3d9d1730486
BLAKE2b-256 4201a44d54204b7d8c3ead5bdf9f6bd66effbbc9ec60e0bf34afbcfa8daaece8

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0f1b840c5634f8c41dfe50b10a33f5159f2d2df4f06d01a3c82e772e04120fa7
MD5 ee0213d325a70958e9de808b0eaaa7d5
BLAKE2b-256 c021a34cf2d54b689f6f593342e94a4870c64bfb231e6f46f39a455908236daa

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a562ce86204682a9446989bc6668fb82d542517a44add32944b87980f3a8aea0
MD5 6e0d3f4d829c03b3f7d990e21a4e9023
BLAKE2b-256 100f12146fcfd54faffe9d161925162781117561ccb8ab23199ea8751a1a2ad2

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b65bf57cd960cdf566541cd2749ec528e10c68cfe6e0915beb8e0b8cb0fd4f4
MD5 638a0d8283a15589175d3b9e8fdf9f53
BLAKE2b-256 5081eb2f85cdef0c342d4ecd95d1974fb38321c5be6fdf23235120bac6e6eb14

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8e7b1a12a73d2b55de6c03bc9cd67c0367935a150cbc7d7497f256711c5b8c5e
MD5 941fb79d37624b7ad4c334b2db7d961c
BLAKE2b-256 2298f500f82fc0c21690c2d6b74e3131b3a2d07d1b29c7f381232719f8f60fa9

See more details on using hashes here.

File details

Details for the file pydevices_lvgl-9.5.37-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydevices_lvgl-9.5.37-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4aeb58fba2553dfe70ee5a28a97fedd9fd207d6e8442bfce5f48915a49a8f4c9
MD5 6534f67a9494520bc701d5d8099a335a
BLAKE2b-256 53b62774c463110a22ed8dfd19ac652e9d994a66b62ea47793e6595c6c661a71

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

9.5.37 This release

16 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page