Streamlit for Building Web Apps

Praneel Nihar
2 min readAug 9, 2020

--

Streamlit is a open source python library for building fast, performant and beautiful data apps. It is a great tool to develop interactive apps quickly for demonstrating a solution.

In this blog we will see how to build a simple hello world web app using streamlit. In the end we will discuss about streamlit’s capability to build a multi page web app.

Building a Streamlit App:

We can build a simple streamlit app by following the below 4 steps:

  1. Make sure you have python 3.6+ installed in your system.
  2. Install streamlit using PIP:
$ pip install streamlit

3. Create a python script by naming it hello.py , enter the following code and save it.

import streamlit as stst.title('Hello World')
st.write('Welcome to my first app.')

4. Run the app by running the following command in a terminal:

streamlit run hello

That’s it in a few seconds you will see the app running in your default browser.

Hello World Streamlit App

The biggest advantage of streamlit is that you can build an app just by knowing how to write a python script as shown above. To look at the various features of library click here

As the library is still in early stages there is no default feature to add multiple pages in a single app but we can create this by using some other features.

In the next blog we will see how to build multi page web apps using streamlit and create a generic framework which is simple to maintain. Click on the below link to go the next blog.

Building Multi Page Web App Using Streamlit

--

--