I recently discovered
#NiceGUI when I was looking for a tool to provide a reasonable interface to
#X1Plus Expander's manufacturing tests. I am pretty impressed so far. Basically, the idea is that you can use it to teleport a GUI into a browser, synthesized inside of Python -- and, of course, modify it as the Python program runs. The thing that this really seems like a win for is quick hacks that have a simple amount of state that is easily represented; the reactive model of web programming is nice for larger things but is incredibly heavy weight. The result is that, in about a night and a half of hacking, I glued together a chunk of straight-line Python into a nice web test runner UI. For better or for worse, NiceGUI feels like the ease (and attendant footguns) of building a UI in Visual Basic 6.
This feels like a super powerful tool to have in my back pocket as someone who periodically has to slap together UIs to just poke and prod at state. The nice thing is that I had to invoke npm a total of zero times, and write zero lines of JavaScript or HTML. If you find yourself with similar constraints, you might consider keeping it in your back pocket, too.
Screenshots attached; UI code here:
https://github.com/jwise/x1-expander/blob/main/utils/boardtest_fe.py -- now all I have to do is persist state to disk, and wire it to the actual test jig (in
boardtest.py).