# Dash

> Build interactive data apps and dashboards in pure Python — no JavaScript required

- Category: App UIs & Builders / Data App Builders
- Language: Python
- Licence: MIT
- Repository: https://github.com/plotly/dash
- Website: https://dash.plotly.com
- Canonical page: https://ai-tldr.dev/tools/dash/

## In short

Dash is a Python framework from Plotly for building analytical web apps and dashboards. It is built on top of Plotly.js, React, and Flask, and lets you connect UI elements like dropdowns, sliders, and graphs directly to your analytical Python code. It sits in the Data App Builders category of the App UIs & Builders tools and is open-source, written in Python and licensed MIT.

## Overview

Dash is a Python framework from Plotly for building analytical web apps and dashboards. It is built on top of Plotly.js, React, and Flask, and lets you connect UI elements like dropdowns, sliders, and graphs directly to your analytical Python code.

It is aimed at data scientists, analysts, and Python developers who want to turn data and models into shareable web interfaces without writing front-end JavaScript. You describe the layout and the callbacks in Python, and Dash handles the browser rendering and the interaction wiring.

As a data-app builder, Dash sits between notebook-style exploration and full custom web development. Apps are declarative and reactive, so adding inputs and outputs with cross-filtering stays manageable as the app grows.

## What it does

- Pure-Python app development — define layout and interactivity without writing JavaScript
- Built on Plotly.js for charts, with around 50 chart types supported including maps
- Declarative, reactive callbacks that link inputs (dropdowns, sliders) to outputs (graphs)
- Built on Flask, so apps run as standard Python web servers
- Full control over look and feel, from dashboards to report-style layouts
- Open-source core (Dash OSS) with an optional Dash Enterprise tier for scaled hosting and auth

## Getting started

Install Dash with pip, then create a single app.py file and run it as a normal Python script.

1. Install Dash

   Install the package from PyPI. The minimal app below also uses pandas and Plotly Express.

```bash
pip install dash pandas
```

2. Create a minimal app

   Save this as app.py. It ties a dropdown to a Plotly graph; selecting a country updates the chart. Requires Dash 2.17.0 or later.

```python
from dash import Dash, html, dcc, callback, Output, Input
import plotly.express as px
import pandas as pd

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder_unfiltered.csv')

app = Dash()

app.layout = [
    html.H1(children='Title of Dash App', style={'textAlign':'center'}),
    dcc.Dropdown(df.country.unique(), 'Canada', id='dropdown-selection'),
    dcc.Graph(id='graph-content')
]

@callback(
    Output('graph-content', 'figure'),
    Input('dropdown-selection', 'value')
)
def update_graph(value):
    dff = df[df.country==value]
    return px.line(dff, x='year', y='pop')

if __name__ == '__main__':
    app.run(debug=True)
```

3. Run the app

   Start the development server and open http://127.0.0.1:8050/ in your browser.

```bash
python app.py
```

## When to use it

- Build an interactive dashboard that lets non-technical users filter and explore a dataset through dropdowns and sliders
- Share a machine learning model's outputs as a web app where users adjust inputs and see updated charts
- Turn a one-off analysis notebook into a reusable, browser-based tool for a team
- Create a styled, report-style data page with full control over layout and appearance
