Skip to main content
v2026.11,986 entries · CC-BY 4.0

Direct comparison

Streamlit vs Dash: Python Data Apps Compared

Streamlit vs Dash for researchers: rerun-the-script vs callback model, licences, install, state handling and when to pick each, from the official docs.

Written and maintained by CASRAI Editorial Board

Last updated

In summary

Streamlit and Dash both turn Python analysis code into a browser app, but they run it differently. Streamlit reruns the whole script from top to bottom on each interaction; Dash calls named callback functions only when an input property changes. Streamlit is Apache 2.0 and installs with pip install streamlit; Dash is MIT licensed, installs with pip install dash and requires Python 3.8 or later, and has Dash Enterprise as its commercial tier. Choose Streamlit to wrap an existing script with the least restructuring, and Dash when you want explicit control over which components update.

How do Streamlit and Dash compare side by side?

The table below compares Streamlit and Dash across 12 dimensions, from programming model to when to pick each.

Side-by-side comparison

DimensionStreamlitDash
Programming modelA normal Python script with Streamlit commands added. The documentation describes building data apps by adding Streamlit commands to a script and starting it with streamlit run your_script.py. The project describes itself as built in Python, with no separate frontend or API layer to write.A Python app in which components and callbacks are declared explicitly. The project describes Dash as data apps and dashboards for Python, with no JavaScript required, built on top of Plotly.js, React and Flask.
Execution modelStreamlit reruns the entire Python script from top to bottom whenever the script source is saved or a user interacts with a widget. A widget returns its value, which the script then uses as an ordinary variable. Callbacks passed through on_change or on_click run before the rest of the script. For a researcher this means the app reads like the analysis itself, top to bottom, but any expensive step placed in the script is repeated on every rerun unless it is cached or isolated.Dash is driven by callbacks. A function decorated with @callback names its Input and Output as a component id plus a property; Dash calls the function when an input property changes and sets the output to the return value. Callbacks also run once at startup with the initial values, and a callback can take several inputs and outputs. For a researcher this means the dependency between a control and a result is written down explicitly in the code, so each output can be traced to the inputs that drive it.
Controlling reruns and extra inputsForms and fragments are the documented ways to limit or batch reruns, so that not every widget interaction re-executes the whole script.State passes a value into a callback without triggering it. The documentation index also lists callback variants: Basic, Advanced, Clientside, Pattern-Matching, Streaming and Background.
Holding state between interactionsA widget that is given a key is stored in st.session_state, which is how values persist across the reruns.Callbacks must not modify variables outside their scope, because one user's session might affect the next user's session. Data is loaded once at global scope and callbacks should copy it rather than modify it; expensive setup also belongs at global scope.
Avoiding repeated computationThe decorator @st.cache_data lets an app skip costly recomputation when the script reruns.Because the script outside the callbacks runs once, load and prepare data at global scope rather than inside a callback, as the callbacks documentation advises. The documentation says expensive setup belongs at global scope, so a large dataset is read once when the app starts.
Installationpip install streamlit, then streamlit hello to test the install. The installation page describes a virtual environment with pip on your own machine, suggests Anaconda for Windows or for users without Python, and lists GitHub Codespaces and Streamlit in Snowflake as options that need no local Python. It does not state a Python version on that page, so check the Python version your project uses against the release notes before committing to it.pip install dash, which installs plotly with dash. The installation page states that Dash requires Python v3.8 or later. Because plotly arrives with the same command, a first chart needs no further install step; as with Streamlit, a research group can install it inside a project-specific environment.
Layout and display elementsThe main-concepts page lists built-in elements including st.dataframe, st.table, st.line_chart, st.map, st.sidebar, st.columns, st.expander and st.progress.Dash is built on Plotly.js and the repository describes roughly 50 chart types, maps included. The documentation also has guides on building your own components and on React for Python developers.
LicenceApache 2.0; the repository describes the project as completely free and open-source. Check your institution's own software policy before redistributing either library inside a shared research tool.MIT licence for the open-source library. Both licences are permissive open-source licences, so the licence alone does not separate the two for a research group; the commercial tier and deployment route are the practical differences.
Commercial tierThe installation page lists Streamlit in Snowflake as an environment in which Streamlit runs without local Python; no other commercial offering is described in the sources used here.Dash Enterprise is the commercial tier. The repository lists an app manager, Kubernetes scaling, authentication (LDAP, SAML, OAuth, SSO), a job queue and embedding among its features.
Sharing an app beyond your own machineThe browser playground is described as not how Streamlit is meant to be used; the supported routes on the installation page are a local install, GitHub Codespaces and Streamlit in Snowflake.The repository states that an open-source Dash app cannot easily be accessed by others beyond the local machine without deployment. The documentation index has a Publishing Your App section, a Plotly Cloud guide and a Dash Enterprise guide. A lab that wants colleagues outside the group to open the app therefore has to plan a deployment route for either tool, and the two projects document different ones.
Language scope and extensionStreamlit is described as built in Python and as plain Python with no separate frontend or API layer, so an app is written entirely in the language the analysis already uses.The documentation now concentrates on Python: it notes that the Dash R, Julia, Matlab and F# docs have been retired. For custom interface elements it offers Build Your Own Components and a React for Python Developers guide, which reflects the React layer underneath.
When to pick eachPick Streamlit when the analysis is already a Python script and you want to put widgets and results around it with the least restructuring, accepting that the whole script reruns on each interaction (managed with cache_data, session_state, forms and fragments).Pick Dash when you want to specify exactly which components update when a given property changes, need the Plotly chart catalogue, or expect to move to authentication, scaling and embedding through Dash Enterprise. It asks you to write the callback wiring explicitly.

Sources

Data: Streamlit and Dash: documented licence, install and execution facts

Side-by-side facts for the open-source Streamlit and Dash libraries, compiled from each project's own installation and callback documentation and GitHub repository, read on 2026-11-17.

Period covered: 2026.

Streamlit and Dash: documented licence, install and execution facts
Tool and attributeDocumented valueSource URL
Streamlit: licenceApache 2.0https://github.com/streamlit/streamlit
Streamlit: install commandpip install streamlithttps://docs.streamlit.io/get-started/installation
Streamlit: execution on interactionReruns the entire script top to bottomhttps://docs.streamlit.io/get-started/fundamentals/main-concepts
Streamlit: persisted widget stateStored in st.session_state when the widget has a keyhttps://docs.streamlit.io/get-started/fundamentals/main-concepts
Streamlit: caching decorator@st.cache_datahttps://docs.streamlit.io/get-started/fundamentals/main-concepts
Dash: licenceMIThttps://github.com/plotly/dash
Dash: install commandpip install dashhttps://dash.plotly.com/installation
Dash: stated Python requirementPython v3.8 or laterhttps://dash.plotly.com/installation
Dash: execution on interactionCalls the callback whose Input property changedhttps://dash.plotly.com/basic-callbacks
Dash: built onPlotly.js, React and Flaskhttps://github.com/plotly/dash
Dash: commercial tierDash Enterprisehttps://github.com/plotly/dash

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Ask CASRAI · full access

Ask about Streamlit vs Dash: Python Data Apps Compared

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →