Data Visualization

streamlit

Turn a Python script into a shareable web app before your coffee gets cold.

Install it: pip install streamlit

What does it do?

Streamlit takes a plain Python script — the kind a data analyst already writes to crunch numbers — and turns it into an interactive website with sliders, charts, and buttons, without anyone touching HTML or JavaScript. Add one line of code and a number becomes a slider; add another and a spreadsheet becomes a live chart. It reruns your whole script top to bottom every time someone touches a control, which sounds wasteful but is exactly what makes it easy to reason about. Data scientists use it to go from ‘here’s my analysis’ to ‘here’s a tool your whole team can click around in’ in an afternoon.

See it in action

This code (run with the streamlit command) builds a small web page with a title, a text box, a slider, and a button that shows a personalized message when clicked.

import streamlit as st

st.title("Sales Dashboard")
name = st.text_input("Your name")
count = st.slider("How many items?", 1, 100, 10)

if st.button("Say hello"):
    st.write(f"Hello {name}, you picked {count} items!")

Why would a non-developer care?

Before Streamlit, sharing a data analysis usually meant sending a static PDF or asking a coworker to install Python and run your script themselves. Streamlit turns that same analysis into a link anyone can open in a browser and actually interact with. That gap between ‘interesting chart’ and ‘tool people use every day’ is where a lot of internal company software now lives.

Real-world examples

Streamlit apps are the internal dashboards data teams build to let executives filter sales numbers themselves instead of emailing a spreadsheet back and forth. It became popular enough that Snowflake, the cloud data company, acquired Streamlit in 2022 to build it into their platform. Without it, most of these one-off internal tools simply wouldn’t exist — nobody would justify hiring a web developer just to add a filter dropdown.

Who uses it

Data scientists and analysts who need to hand a working tool to non-technical colleagues, not just a chart in an email.

How it compares to alternatives

Gradio is Streamlit’s closest cousin but leans toward wrapping a single machine learning model in a demo, while Streamlit is built for fuller multi-page apps and dashboards. Dash, from the makers of Plotly, offers similar power but with a steeper learning curve and more code. Flask and Django can build the same things but require actually knowing web development.

Fun fact

Streamlit was co-founded by former engineers from Google and Zynga, and was acquired by Snowflake for roughly 800 million dollars less than three years after its public launch.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries