Introducing Dash MCP + Building Dash Apps with Coding Agents. Reserve your spot.

author photo

Nathan Drezner

June 1, 2026

Dash 4.2: Choose Your Backend — FastAPI and Quart Support

"We love Dash, it's been perfect for our team of Python developers who want to provide rich web frontends. We're coming up against the issue that it's difficult to host alongside our other web services though, primarily because we use FastAPI." 3tilley

fastAPI and Quart dash 4.2

In the course of Dash’s lifetime since its introduction in 2019, our community worked on alternate backend forks of Dash, teams ran monkey-patched async workarounds that broke on every release, and users in multiple languages kept asking the same question: can we use something other than Flask?

With Dash 4.2, we’re making this capability first class by adding FastAPI and Quart as server backends which can be enabled in your Dash app simply by updating the backend parameter in your Dash constructor.

The problem

Dash has always created a Flask server under the hood. Flask is a solid default, but it becomes a constraint when your team already runs FastAPI and you need your Dash app to live inside that existing service, or if you want to leverage capabilities of a different backend not supported by Flask – for example, async functionality. Before this release, that meant running two servers and setting up a reverse proxy, which is a lot of infrastructure for what should be one application.

The async story was also difficult. Teams that needed WebSocket endpoints or server-sent events alongside their Dash apps had to look outside the framework. We loved community projects like async-dash, which tried to fill the gap with monkey-patching, but it’s hard to maintain a fork as Dash constantly has improved with time.

What's new

You can now pass backend="fastapi" or backend="quart" to the Dash constructor:

app = Dash(__name__, backend="fastapi")

If your team runs FastAPI, your dashboard no longer needs its own server and a reverse proxy in front of it — it mounts at a route like /dashboard/ in the app you're already shipping. One server, one deploy, one thing to monitor.

It also unlocks the async work people have been routing around for years. Your callbacks can be async def with no extra dependencies, and you can define your own async endpoints right on app.server. That means a single /api/data endpoint feeding both your Dash dashboard and a React frontend, a WebSocket streaming live updates into a component, or server-sent events reporting progress on a long-running job — all from the same app.

An async backend also unlocks WebSocket callbacks, new in 4.2. Instead of the usual request-response over HTTP, a callback runs over a persistent connection — it can push updates to the UI as they happen with set_props, read live component state mid-execution with get_prop, and run continuously in the background with persistent=True. That covers live dashboards, progress indicators for long-running jobs, and real-time feeds without polling, and it's a clean replacement for dcc.Interval: server-push instead of client-pull. WebSocket callbacks require a FastAPI or Quart backend. Read more about WebSocket callbacks.

And none of your existing code has to change. Callbacks, layouts, and components work exactly the same on every backend; the only difference is what you can build on the server side. Flask stays the default, FastAPI gives you dependency injection and automatic API docs at /docs, and Quart gives you async while keeping Flask's API conventions. Pick the one that fits your stack and keep building.

Which backend should you choose?

Flask is still the default. If your app doesn't need custom async endpoints, nothing changes.

FastAPI gives you async endpoints, dependency injection, WebSocket support, and automatic API docs at /docs. If your team is already on FastAPI, your Dash app can mount directly into your existing server. You can also serve a Dash app alongside a React frontend and shared API endpoints from a single FastAPI instance.

Quart is worth a look if you want async but prefer Flask's API conventions. As of 2022, Quart (now an official Pallets project) mirrors Flask's API closely enough that migration is straightforward. If you've built custom Flask routes around your Dash app, Quart lets you go async without rewriting them.

Getting started

Install the extra for the backend you want:

pip install "dash[fastapi]"

Set it in the constructor:

app = Dash(__name__, backend="fastapi")

Your existing app code doesn't need to change. Deployment to Plotly Cloud auto-detects the backend, so there's no additional configuration there.

When providing your own FastAPI or Quart server, or deploying to production, run with uvicorn:

uvicorn app:server --host 0.0.0.0 --port 8050

Why now

FastAPI has become one of the most popular Python web frameworks. Quart joined the Pallets project (the organization behind Flask). Python's async ecosystem has matured to the point where not supporting it felt like a real gap.

This was one of the longest-running feature requests for Dash. We're glad it's finally here.

Check out the server backends documentation for the full setup guide, code examples, and deployment instructions.

bluesky logo
x logo
instagram logo
youtube logo
medium logo
facebook logo

Product

© 2026
Plotly. All rights reserved.
Cookie Preferences
AICPA Icon
ISO 27001
ISO 27701
ISO 42001