Show HN: Full Python GUI apps in the browser – no JavaScript, no server
github.com19 points by pstomi 4 hours ago
19 points by pstomi 4 hours ago
I have been working on Dear ImGui Bundle since 2022, but it is the first time I talk about it here. It is a framework around Dear ImGui for building interactive applications in Python and C++. It comes with batteries included: Plotting, image inspection, Markdown, node editors, 3D gizmos, knobs, toggles, etc.
https://imgui-bundle.pages.dev
It now also runs smoothly in the browser via pyodide: The playground below is a python app running in your browser (no server, no JavaScript). You can edit the code on the left and click Run. It even works on mobile.
https://imgui-bundle.pages.dev/playground
I have a strong interest in providing tools that help others express their creativity. This project aims to be a step in this direction as it helps develop GUIs where the code is extremely readable & hackable.
Some of the goals it addresses:
- Bring true Immediate Mode GUI to Python and C++
- A versatile range of high quality libraries: Widgets, Plots, Image Analysis, Node edition, markdown rendering
- Multiplatform apps in C++: works on all platform in C++ (desktop, mobile, emscripten)
- Deploy python apps to the web
- High quality python bindings that are always up-to-date (because they are auto-generated)
- Smooth transition between C++ and Python (same APIs for both)
I'd be happy to answer questions!
Is this downloading and installing Python packages into the browser via wasm? I like the idea a little bit. Mostly because I don't like javascript. So I say keep going for it, it could fill some niches. I'm sure you know this, but the page takes like 30s to load on mobile. It wasn't a comfortable ux. Once it did load it seemed pretty fast though so kudos. Kind of gave me macromedia flash vibes from 2002. If no JavaScript then what enables interactivity? Thanks for the question! I should have said almost no JavaScript: There is a minimal amount of JavaScript just to download and run pyodide and then it is only Python: see example at https://imgui-bundle.pages.dev/playground/?demo=p_35_minimal... Web assembly? This started out as a bowdlerised form of JavaScript (asm.js) but evolved to become is own thing. You still need JavaScript to instantiate WebAssembly and let it interact with the page, which is why your sibling comment admits there's still a bit of JS.
2ndorderthought - 18 minutes ago
gloflo - an hour ago
pstomi - an hour ago
hagbard_c - an hour ago
sheept - 38 minutes ago