Why I fell in love with Streamlit
And why you will too. If you just take 5 minutes to read this article.
So if you are a backend freak like me you will know how much of a hassle it is to create a frontend to complement your backend. After you create an API the only thing left is to let the client use it. But creating a good UI/UX is very difficult more so for a backend dev. Streamlit comes to the rescue.
Streamlit is an open source python library that makes it very easy to host data driven apps and scripts as a web app. But there is something that they don’t tell you. It is not just limited to data dashboards and ML models. You can also just use it as a frontend for your normal backend apps.
And the best thing. You can do it without writing a single line of HTML, CSS or JavaScript. In just python you can create a minimalist frontend for your app with dynamic rendering, forms, graphs and a lot more.
Streamlit is a robust framework that has saved me a significant amount of time in the SDLC process. By using streamlit I can get an interactive client side frontend up and running in 5 minutes and connect my backend to it in another 5.
Streamlit allows you to work with any kind of data or input. So you can create dynamic forms with file inputs very easily. Which if you try to do the traditional way using a JavaScript framework like React or Vue or the pythonic way using something like Flask or FastAPI will take a lot of work.
Here are some of the applications that I have created using Streamlit.
But streamlit is not all powerful. There are some restrictions to using it. The most glaring being the fact you can only create single page applications using it. So it might be good for creating a small college project or just show some data. It certainly isn’t the best thing to create a blogging service using it.
Also the streamlit UI is rather minimalistic. So for the more creative people out there this could be a setback. But if you don’t have a creative bone like me it could just become your best friend.
But with the help of streamlit component templates you can very well create your own theme to use in future projects. Or you could just use a prebuilt template. There are many beautiful ones that you can check out over here.
Here is a tutorial about how you can use streamlit to host an image classification ML model.
So go ahead and create your own app or ML model and host it using streamlit. And also check out their Github organization.
I hope this blog was useful to you and nudges you towards using streamlit.