I was very excited for Streamlit when I heard about it. I’ve built several applications using it, including a logs browser and a semantic search frontend. I’ve also advocated for it at my workplace and convinced several colleagues to try it.
Unfortunately, the more I use Streamlit the more disenchanted I become. The biggest issue is that nearly all applications need some form of state, even if just for checkboxes and simple tiny things. Yes, I know that state features are being added. But I’m concerned that fundamentally the approach that Streamlit has taken is not conducive to anything more advanced than a basic read-only data viewer. The model of re-running the entire application after anything changes is just fundamentally opposed to many kinds of basic user interaction.
I am sceptical that there is a good solution to managing state in a Streamlit application which doesn’t make it more complex than a Flask app. Flask is dead simple to reason about – you hit a route and the code in the route is run. Every person I know who has built a Streamlit app has had many WTF moments, very frustrating behaviour. The computational model of Streamlit just doesn’t make much sense if you are doing anything that isn’t entirely linear. I know there is an underlying logic and I’m sure the developers are pretty comfortable with it, but the computational model is just not nice to think about. It isn’t fun to debug or to get user interaction to work right. I don’t want to have to reason about my entire application being re-run every time. And caching is its own set of worms…
Pretty much every issue I’ve run in to, just really dumb simple things, the response is “we don’t support that currently, use this hack”. Usually the hacks don’t work either – the app renders with state from the previous run, things are out of sync. God knows what’s going on under the hood.
At the end of the day, for anything beyond the dead simple, a Streamlit user needs to become an expert at what is going on behind the scenes. Reasoning about application behaviour in the Streamlit computational model is like fitting a square peg in to a round hole. It just doesn’t feel good. Streamlit was supposed to be simple and fast. It’s not either of those things.
Do other people feel this way?
Edit: When it works, for simple linear read-only apps, it works well. I’m just concerned that the range of use cases is just much smaller than I had hoped for initially. And I’m still not a fan of the computational model which seems simple but forces the user to reason about what is happening under the hood, making the apparently simple not so simple.