Micropython api


today i started to work with lvgl and micropython. Widgets for micropython are well documented but is there any api/documentation for the rest, e.g. input devices, groups. It’s a little bit hard to to find methods and const names from the c-api.

Thank you

a good overview is the file lv_micropython/mpy-cross/build/lvgl/lv_mpy.json (after compiling). Using a an json-Reader you can see all classes, methods …

Hi @Lebowski!

Micropython supports some level of introspection.
On the REPL (Python shell) you can click TAB to see a list of completions, either for the LVGL module namespace or for specific functions/fields of objects/structs.

This can also be achieved with the dir command.

As you suggested, you can also look at lv_mpy.json which contains most (but not all) of the API. The advantage of the JSON file is that it provides more detailed information for functions (types of arguments, type of return value etc.) which are not provided by Micropython introspection.