Settings

Theme

Show HN: Python Live GUI – A Hybrid of Dear ImGUI and Phoenix LiveView

gitlab.com

85 points by RupertWiser · 19 comments

Reader

9 threads
RupertWiserOP

Hey all, author here.

I had some time off last week so I built a little tool I've been planning on using for a while now.

Thought I'd just comment on my motivations for building this.

I bought a little chromebook tablet to take on holidays. I've been enjoying the experience of using a remote IDE to code on my personal server.

I thought it would be neat if I could quickly make myself GUIs for other utilities on my remote server that get rendered on my chromebook. Doing this like being able to run bash scripts remotely.

I start utility scripts with this tool and then just use ssh port forwarding to view it locally.

The fun bit is the application itself is then just written in python.

There are some similar alternatives[1] but I wanted to be able to write GUI elements like ImGUI so I decided to build my own tool in the end.

I just wrote it in python because that's what I've been using at work lately.

[1] https://github.com/dbohdan/liveviews#python

appveyor

Another LiveView-like UI framework for Python: https://github.com/flet-dev/flet - created specifically for highly interactive real-time experiences. You build your UI from controls made of Flutter widgets and partial UI updates are passed to a browser via WebSockets.

  • upupandup

    holy cow!!! this is amazing, like PySide4 but for Flutter

    Flutter would be perfect if it produced web applications that were more widely adopted.

    • appveyor

      Right? I know Google has a habbit of dropping great projects, but, somehow, I believe in the future of Flutter on web :) Using Canvas + Skia + WebAssembly for rendering UI in the browser could look like a "wrong" approach today, but, hey, Google created the most popular browser, so who knows. They talk about their vision in this video: https://youtu.be/kCnYRhkfWHY. Flutter is great for web apps, not for web sites where SEO is important. And Google is actively working on better accessibility support - Accessebility Object Model (starting at 10:00 in that video) which is eventually could to be a new standard.

  • drBonkers

    Is there a way to for multiple users to connect to the same web application with Flet?

GOATS-

This seems pretty neat - however I don't feel like the screenshot shows what this can be used for as there's no interactive components.

  • RupertWiserOP

    Yeah I should probably replace the screenshot with a gif. Thanks for the feedback!

markisus

Dear ImGUI also has python bindings [1] which I've had great success with in tuning computer vision algorithms interactively. It's a slightly different use case than your project here since it doesn't use a browser and only works locally.

[1]https://github.com/pyimgui/pyimgui

pizza

Nice. I wonder.. if you could use pyscript [0] + some kind of js-based in-browser http server such as nohost [1] or WebRTC peer to peer.. could you run serve the GUI to other browsers just by opening it in the browser itself?

[0] https://pyscript.net/

[1] https://github.com/humphd/nohost

mynameismon

How does your tool do on accessibility? Asking specifically, as that is the one hill most open sourced guis die on.

  • RupertWiserOP

    Not yet, I plan to add support for this ~soonish because it will be harder to add later on.

    It’s very much early days though. I didn’t want to go near accessibility until I had standardised the rendering model somewhat.

    It also waits to be seen if anyone actually wants to use this besides me.

  • FloatArtifact

    Thank you for bringing this up.

marginalia_nu

Immediate mode GUIs are amazing and super slept on if you want to quickly slap together user interfaces.

andrea76

The result can be hosted? I don't understand if you can do client<->server communication.

Der_Einzige

Is there any relationship between this and DearPyGUI?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection