Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I am doing something like this in a [panel](https://panel.holoviz.org/) dashboard, which I am currently converting to nicegui. Maybe I can provide an example in some days.
I suggest you dig into async/await; there is no way around that. Ideally you will use an async mqtt client like https://github.com/sbtinstruments/asyncio-mqtt to handle the communication. Otherwise you need to schedule long running (eg. blocking commands) into another thread like we do in this example: https://github.com/zauberzeug/nicegui/blob/554b47af1bb9baf45367c5ff11b4a61cc5366390/examples/opencv_webcam/main.py#L35-L37