# Streamlit

> Turn Python scripts into interactive data and ML web apps

- Category: App UIs & Builders / Data App Builders
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/streamlit/streamlit
- Website: https://streamlit.io
- Canonical page: https://ai-tldr.dev/tools/streamlit/

## In short

Streamlit is a Python framework for building interactive web apps from plain scripts. You write normal Python and call simple functions like st.slider or st.write, and Streamlit renders the widgets and output as a web page. It sits in the Data App Builders category of the App UIs & Builders tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

Streamlit is a Python framework for building interactive web apps from plain scripts. You write normal Python and call simple functions like st.slider or st.write, and Streamlit renders the widgets and output as a web page. There is no separate HTML, CSS, or JavaScript to manage.

It is aimed at data scientists, ML engineers, and Python developers who want to share dashboards, reports, or models without building a frontend. As you edit your script, the app updates so you can prototype and gather feedback quickly.

As a data app builder, Streamlit fits the gap between a notebook and a full web stack. You keep your work in one Python file, and you can deploy and share it through the free Streamlit Community Cloud.

## What it does

- Build interactive apps in pure Python, with no frontend code required
- Input widgets such as sliders, plus dataframes, charts, and layout helpers
- Live editing: the app updates as you change and save your script
- Multi-page apps for organizing larger projects
- Extra functionality through community-built Streamlit Components
- Free deployment and sharing via Streamlit Community Cloud

## Getting started

Install Streamlit with pip, confirm it works with the built-in demo, then write and run your first app.

1. Install and verify

   Install Streamlit from PyPI, then run the bundled Hello app to confirm your setup. It should open in your browser.

```bash
pip install streamlit
streamlit hello
```

2. Write a minimal app

   Create a file named streamlit_app.py with a slider and some output.

```python
import streamlit as st
x = st.slider("Select a value")
st.write(x, "squared is", x * x)
```

3. Run your app

   Start the app from your terminal; it opens in the browser and reloads as you edit the script.

```bash
streamlit run streamlit_app.py
```

## When to use it

- Build an interactive dashboard to explore a dataset and share it with your team
- Wrap a machine learning model in a simple UI so others can try it with their own inputs
- Create an LLM or chatbot app where users type prompts and see responses
- Generate live reports that update as the underlying data or parameters change
