(One of my summaries of the 2025 pycon.de conference in Darmstadt, DE).
Streamlit is used a lot for dashboards. Fasthtml is a new contender. He demoed both of them at the same time (well done, btw, one of the better comparisons I’ve seen!), I wrote down some notes:
Streamlit runs through your python file and puts stuff on your screen (like a “h1”) immediately. So you see the page being build up, which tells the user something is happening. Fasthtml only sends over the page once it is fully ready.
Fasthtml is based on htmx! So you can put placeholders on the screen that are filled in later with htmx. This helps putting something on the screen right away.
There’s a fh_plotly library to create plotly graphs.
In fasthtml, it is fast to react to clicks and add something to the page. Only the new element is calculated, the rest stays the same. In streamlit, the whole page is calculated again, which is expensive. You can speed it up a bit with caching.
Adding login functionality is easier in fasthtml, especially as the layout of the page is more explicit. You can have “components” in the layout and you can swap them. So a login form component can be shown if you’re not logged in and swapped out for the actual content once you’re logged in. In streamlit, such interaction is harder as you have to manage some state variables and re-run the full script.
A slider below a graph to influence the size of the markers on the graph is easy in fasthtml. But in streamlit, you need advanced tricks as the graph is rendered first, even though it has to be influenced by a slider value, even though the slider isn’t defined yet.
Multiple pages are a pain in streamlit. In fasthtml it is just another url.
Streamlit gets you started fast. Often fewer lines of code. Many third-party integrations. Whole-page refresh only. Confusing control flow. And… if you learn streamlit, you only learn streamlit.
Fasthtml needs some boilerplate. More lines of code. Fewer integrations, but that’s because the project is pretty new. If you learn fasthtml, you learn regular web development. He thinks he can build pretty big projects with it.
See also the streamlit vs reflex talk from yesterday.
The code for his presentation: https://github.com/tilman151/streamlit-vs-fasthtml
Photo explanation: random picture from Darmstadt (DE)
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):