← Back to list

Blog Web App Development using Python (Streamlit-1)

Hello everyone! Does creating a web application excite you? For that matter, let’s see what’s in a web application.

Shivani Goel · 2026-06-13 08:31 · 4 claps · 4.2 min read
#web-apps #streamlit #python-programming #python-web-development
Open on Medium ↗
Wiki topics: 💻 · Programming 🌐 · Web Development

Blog Web App Development using Python (Streamlit-1)

Hello everyone! Does creating a web application excite you? For that matter, let’s see what’s in a web application.

A web application is a webpage where many interacting parts are categorized into client-side components (frontend), server-side components (backend), and infrastructure components. Together, these ensure that a user can input a request via different components like text boxes, radio buttons, check boxes, lists and select some actions using clicks of buttons. Then the request is translated into an interactive, real-time web experience where the output is displayed in various ways.

Developing some code in Python is easy. But making it in the form of a web application is tedious. Let’s see some ways for doing this:

One way is to write full stack code including client side, server side and databases. Another way is to use visual drag and drop interfaces without no coding. The third method is to use AI driven conversational generators.

However, if one wants to use only Python, we can choose between two ways:

(a) Traditional backend frameworks (which need pairing of Python with HTML/CSS/JavaScript)

(b) Pure-Python full-stack frameworks (which require zero frontend code).

Traditional backend frameworks run the server-side logic and we can connect or build a separate user interface. Examples of such frameworks are:

Using pure Python Full-stack frameworks, frontend visual components and backend logic can be written in Python. Examples of such frameworks are:

Today we will learn about Streamlit which is very easy to use for developing a web application for a Python program. It is a Python library which is designed primarily for creating dashboards for data science and machine learning programs.

Step 1: Install streamlit on the system: This can be done using the following command on the command prompt or the terminal:

$pip install streamlit

Step 2: Running a Python file with streamlit code(say, file1.py): This can be done using the following command on the command prompt or the terminal:

$ streamlit run file1.py or $pythom -m streamlit run file1.py

Step 3: Streamlit starts a local development server on the system and a URL is displayed: *http://localhost:8501). This is to be opened in a browser to view and interact with the web application which we have created in file1.py*.

Now, we come to create the content of file1.py which contains the logic for web application in Python.

For this, we need to know the type of widgets the web application can have. Have a look:

Let’s learn commands for these one by one:

First, we need to import streamlit in Python file for using any of these widgets in the web application.

import streamlit as st

(This command saves efforts in writing full streamlit as st only)

import streamlit as st

st.title(“My Web App”) # title displayed on the title bar of web application

st.header(“Welcome”) # Welcome displayed in Header format (Big size)

st.subheader (“This is web app to display a welcome message”)

This is how the output is displayed in web application:

st.text(“Please enter your name:”) # This text will be displayed in web application

st.text_input(“Please enter your name”, “Type here”)

This text will be displayed in web application and an area with given message for typing by user will be displayed)

st.button(“OK”)

st.button(“Cancel”)

We can add code for executing code for clicking OK or Cancel.

if st.checkbox(“Yes/No”):

st.text(“Yes”)

else:

st.text(“No”)

response=st.radio(“Select answer:”,[“Y”,”N”])

if response==’Y’:

st.success(“Yes”)

else:

st.success(“No”)

hobby=st.selectbox(“Select your hobby”,[“Reading”, “Writing”, “Dancing”])

st.write(hobby)

hobbies=st.multiselect(“Select your hobbies”,[“Reading”, “Writing”, “Dancing”])

st.write(“Your hobbies are: ”,hobbies)

rating=st.slider(“Choose a rating”, min_value=1, max_value=5)

st.write(“You have given rating as:”,rating)

st.divider()

st.html(“<p> HTML paragraph: </p>”)

That’s the end of this blog. I hope these few widgets are clear. In the next blog, we will create a specific web application using these widgets and learn more widgets.

Let’s create a positive world by practicing Ho’oponopono which is an ancient Hawaiian practice of forgiveness, reconciliation, and spiritual healing for the world:

I am Sorry. Pl. forgive Me. I luv U. Thank U!


메타데이터
post_id
3be5822531ff
slug
blog-web-app-development-using-python-streamlit-1-3be5822531ff
url
https://medium.com/@shivanigoel1011/blog-web-app-development-using-python-streamlit-1-3be5822531ff
canonical_url
https://medium.com/@shivanigoel1011/blog-web-app-development-using-python-streamlit-1-3be5822531ff
author_url
https://medium.com/@shivanigoel1011
status
ok
fetched_at
2026-06-15 20:49:13