Python bindings for layer-shell-qt?

Is it possible to use layer-shell-qt with Python? If not, how difficult would it be to add such support?

I’m working on adding Wayland support to Qubes OS. It currently uses GTK3 for its application menu, which already has layer shell integration via gtk-layer-shell. Since gtk-layer-shell is based on GObject and supports GObject introspection, it can be used from Python without having to write any C or C++ code.

Qubes OS is exploring switching to Qt completely. This will require using layer-shell-qt for the desktop environment components. Is it possible to use layer-shell-qt from Python? If not, would it be possible to write and upstream Python bindings so that those writing the GUI don’t need to write or maintain any C++ code?

I’m not involved in the KDE Frameworks Python bindings, but from what I saw in other repositories, adding such bindings is not that much work. See Add Python bindings (e0074015) · Commits · Frameworks / KCoreAddons · GitLab for an example.

It’s not possible right now, but bindings could be added. At least from a quick glance over the API I don’t see any obstacles

Shouldn’t it be possible to do a native Python implementation of the layer-shell protocol instead of wrapping a C or C++ implementation?

PyWayland seems to have a scanner tool.
Maybe it does the same for Python that wayland-scanner does for C or qtwaylandscanner does for Qt/C++?

A pure-Python protocol implementation is of course possible, but my goal is to support PySide applications and those require Qt integration.