Hyperdiv: Reactive web UI framework for Python
Hi guys! I'd like to share a reactive web UI framework I've been working on for a while that I made public a couple of days ago.
- GitHub: https://github.com/hyperdiv/hyperdiv
- Homepage: https://hyperdiv.io
There is a short coding demo video and intro article on the website.
What My Project Does
Hyperdiv is a way to build reactive UIs in pure Python quickly, with a built-in UI component system based on Shoelace (https://shoelace.style), markdown, and charts based on Chart.js (https://chartjs.org). It uses immediate-mode syntax which enables seamlessly blending declarative UI code with Python logic and event handling.
Target Audience
The aim of Hyperdiv is to reduce tool and language complexity when building full stack apps, and enable people to get to a working UI very quickly. I think it is a good fit for adding browser UIs to CLI tools, prototyping UIs, and internal tools. You can also put it behind Nginx and deploy it on the internet.
Comparison
Hyperdiv adds to a niche currently occupied by Streamlit, Reflex.dev, PyWebIO, PyJS, etc. -- frameworks that let you build web apps in pure Python.
Hyperdiv stands apart with a unique blend of immediate-mode UI + reactive state, and letting you build fairly unrestricted, arbitrarily nested UI layouts with terse syntax.
I appreciate your support!
48 comments · 90% upvoted · other discussions
how would it work for converting a rather large gradio app (https://github.com/runew0lf/RuinedFooocus) to Hyperdiv, the reason being me and my fellow dev are shite when it comes to making pretties
Hyperdiv-io [OP] 3 points · Feb 2024
Hi! There's probably no easy way to convert an existing Gradio app to another framework short of rewriting it in that other framework.
riklaunim 2 points · Feb 2024
Changing a framework won't solve the problem of making good UX for an application. And as the UI is controlled by Python it could be harder as you can't leave that work to a frontend/UX/UI designer. Gradio or this are best at making something quickly or for internal use, not for production/final versions of apps.
runew0lf 3 points · Feb 2024
gradio is shite mate :D
riklaunim 6 points · Feb 2024
It's a very popular and successful project. If you have so much problems with it then likely you are using the wrong tool for your needs and switching to young unproven project of similar nature won't solve your problems. The correct thing would be to list the problems and asks for solutions.
sanitylost 1 points · Feb 2024
the problem with most UI design is that it's like speaking a different language when compared to a lot of the other ways python is used. People can have a hard time with the UI design simply from the garbled and often unintuitive ways that UI syntax design has become. Just because someone doesn't understand Greek doesn't make them an idiot.
riklaunim 2 points · Feb 2024
I would say ux/ui is a separate thing from backend development. Even knowing frontend languages doesnt mean someone can design good ui/ux but can implement it.
sanitylost 1 points · Feb 2024
right, but lots of packages/groups say they, "want to make UI design approachable" while never doing that. I think what most people who work in backend/algo dev/science have the problem with is that the steps to create basic tables with relatively simple options, like dynamic updating and line modifiers requires you to learn three languages and syntaxes.
This is apart from making something that's moderately intuitive to use. That's a whole other discussion. Just getting information on a page in a way that's moderately useful can be a pain when it's not what you do day in day out.
riklaunim 1 points · Feb 2024
There is something with backend developers wanting to do everything in backend and refusing to work in team with fronten devs or learning it. Like "webdev in Python only" with some commenting how JS "sucks" or how they can't get it and want a Python-only solution. Then they get Python wrappers around frontend widgets and have problems getting more than the wrapped widgets can provide and when they get PyScript they can't write a line of code because they skipped on JS/frontend and have zero frontend knowledge.
[deleted] 1 points · Feb 2024
[deleted]
riklaunim 1 points · Feb 2024
SPA / JS frameworks can be evil and not everything has to be SPA on the web frontend. We still can use jQuery and Bootstrap ;)
Also you can put a Svelted/react dev on the frontend which should yield much better results than Python developers trying to use a Python UI generators.
load 0 more replies →