Show HN: Hstream – quick Python web apps – Streamlit alternative using htmx
104 points| conradbez | 3 years ago |github.com
With all the recent HN hype around htmx and sematic html / classless css I decided to build a Streamlit alternative using these on top of FastAPI.
This has a couple advantages: 1) easier to extend when you move past PoC since the FastAPI app is exposed (allowing adding more routes) and hstream acts more like a typical web stack 2) with htmx and html (plus MVP.css) doing the heavy lifting the package is alot less complex and easier to reason about - and hopefully more performant eventually 3) html is simple, so using this we can give the user much more control around the look and feel, while falling back onto MVP.css (classless css) sane defaults.
Would love to hear people's thoughts.
silver-arrow|3 years ago
sandGorgon|3 years ago
ZeroCool2u|3 years ago
Taking a step back, what would the benefits be compared to Dash?
[1]: https://dash.plotly.com/
conradbez|3 years ago
When writing a python script you tend to think from top to bottom - as your script runs through. Dash adopts the html approach of defining a document and callbacks. After doing the refactor to this model I found the trade-offs of Dash wasn't worth the time saved of going straight to a more traditional stack, and again you're pretty locked-in to this choice now.
One example was writing a Dash SSO component turned into quite an ordeal (more so than most SSO integrations) - my aim here is to make an extension like this easier because you've got access directly to the FastAPI app with `hs.app`.
zachwill|3 years ago
boxed|3 years ago
conradbez|3 years ago
nvusuvu|3 years ago
unoti|3 years ago
Proof of Concept, or initial prototype.
knowsuchagency|3 years ago
I think it's also worth giving a shoutout to wave in this space; they have quite a few components you can use out-of-the-box https://github.com/h2oai/wave
abraxas|3 years ago
shapiromatron|3 years ago
conradbez|3 years ago
recursivedoubts|3 years ago