Streamlit Logo

Streamlit: A new way to prototype interactive UI in Python

Berk Orbay
berk-orbay
2 min readAug 14, 2021

--

I am a long-time (almost 10 years) R user and a big fan of its extended universe. I have very limited HTML/CSS/JS skills so building sophisticated interactive and browser based tools from scratch is beyond my reach. Therefore I absolutely loved Shiny when I learned about it. I just spent a couple of hours to learn about its dynamics and I could be able to develop 90% of what I imagine (mostly data related simple dashboards btw). In my opinion, Shiny is still the single best tool for spinning up a project if you lack intermediate skills in HTML/CSS/JS in any language.

If you just want to see a Streamlit example, start here

However; I am in constant search for alternatives to Shiny, especially in Python. So far I have found these:

  • Flask, Django and similar frameworks: Too much work. Leave it to pros.
  • Plotly Dash: Seems a bit better, but still too much work at that time. A bit enterprise-y (no shame in that, though). It has R and Python (and Julia!) support. I think currently the only viable option in Julia.
  • Anvil: This is actually an interesting project. At the time I was exploring it it was cloud-only, therefore not exactly what I looked for. Since then they open sourced its backend engine aswell.
  • Shiny: With reticulate, you can easily embed a Python backend but still a two language solution.
  • Streamlit: Started as simple interactive dashboards for machine learning applications. Since then, it continuously adds features for more flexibility. Currently the best option to rapidly prototype ideas in an interactive environment.

What Streamlit is not

Streamlit is not a full fledged web app builder. It has many quirks of its own and some of them are by design (e.g. the page refreshes every time an action is taken). Options and customization abilities are fairly limited (but improving). Streamlit is designed for its own niche and it will experience some growing pains in the future because of its design.

Nevertheless, it is amazingly useful.

Streamlit Share

This is a new feature of Streamlit. You can create a public repo and connect your repo to Streamlit servers and they will deploy your app.

Conclusion

If you are working with Python and looking for a quick and simple but also elegant solution, give Streamlit a try.

--

--

Berk Orbay
berk-orbay

Current main interests are #OR and #RL. You may reach me at Linkedin.