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.