Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
c457ab7
initial push
BSd3v Sep 9, 2025
4ebc657
work to modularize the dash eco-system and decouple from Flask
BSd3v Sep 9, 2025
9dff791
fix favicon
BSd3v Sep 9, 2025
c319b18
removing changelog entry
BSd3v Sep 9, 2025
7de2a41
fixing issue with debug true for FastAPI
BSd3v Sep 9, 2025
2cd769e
fixing `catchall` for path routes
BSd3v Sep 9, 2025
686f32f
fixing pages for use with `fastapi`
BSd3v Sep 9, 2025
660e257
fixing issue with flask pages
BSd3v Sep 10, 2025
581f8a5
Merge pull request #3 from BSd3v/modularize-dash-server
BSd3v Sep 10, 2025
9eb9dd0
Merge branch 'dev' into bring-your-own-server
BSd3v Sep 10, 2025
0fa5c99
fixing for lint
BSd3v Sep 11, 2025
1088331
fixing issue with failing test due to `endpoint` name
BSd3v Sep 11, 2025
4920e33
fixing `run` command to trigger `devtools` properly
BSd3v Sep 11, 2025
9ffba5a
fixing issue with lint and debug ui
BSd3v Sep 11, 2025
908aacd
fixing issue with `_app` when using dispatch, need to keep in context
BSd3v Sep 11, 2025
9491c7f
fixing issue with catchall
BSd3v Sep 11, 2025
39ad7bd
fixing issue with args and cancelling callbacks
BSd3v Sep 11, 2025
7bf69a7
fixing issues with pages metadata and flaky tests
BSd3v Sep 11, 2025
10681dc
fixing issues with relativate paths
BSd3v Sep 11, 2025
4944d6d
∙ - initial quart factory
Sep 11, 2025
3b0f47e
Quart factory ready
Sep 12, 2025
1112f77
fixing for lint
BSd3v Sep 12, 2025
8c52bbb
fixing issue with apps overwriting other paths
BSd3v Sep 12, 2025
aabeeb7
removing print
BSd3v Sep 12, 2025
5659cd7
cleanup
Sep 12, 2025
b05e376
reverting `render_index` -> `index` and making catch for outside of a…
BSd3v Sep 12, 2025
ed0dc3b
∙ - initial quart factory
Sep 11, 2025
141527c
Quart factory ready
Sep 12, 2025
3e38d41
fixing `prune_errors` test
BSd3v Sep 12, 2025
381fb0c
adjustments for flask api_endpoint declared in callback defs
BSd3v Sep 12, 2025
a27927a
updated QuartRequestAdapter & QuartFactory to latest changes
Sep 12, 2025
fbc3935
checkout
Sep 12, 2025
1824e11
Removed redundant Response return
Sep 12, 2025
b14f6d2
fix for fastapi `api_endpoint` registering
BSd3v Sep 12, 2025
fbefbc9
Merge pull request #4 from chgiesse/quart-factory
BSd3v Sep 12, 2025
5ef796b
shifting from `server_factory` to `backend`
BSd3v Sep 12, 2025
a4ca566
adding missing files
BSd3v Sep 12, 2025
708773f
fixing issue with server not declared
BSd3v Sep 12, 2025
b7bceba
Update dash/dash.py
BSd3v Sep 12, 2025
9873079
Update dash/dash.py
BSd3v Sep 12, 2025
9f4d291
Update dash/backend/quart.py
BSd3v Sep 12, 2025
da86e86
Update dash/dash.py
BSd3v Sep 12, 2025
4c60740
Update dash/dash.py
BSd3v Sep 12, 2025
84cb5e5
update for caller_name
BSd3v Sep 12, 2025
29cf823
Update dash/dash.py
BSd3v Sep 12, 2025
5d0f4dc
Update dash/dash.py
BSd3v Sep 12, 2025
86f4528
adjustments for matching types
BSd3v Sep 12, 2025
2a88385
Update dash/backend/registry.py
BSd3v Sep 12, 2025
df76ed6
Merge branch 'factory-backend' of github.com:BSd3v/dash into factory-…
BSd3v Sep 12, 2025
bc51c0d
Update dash/backend/registry.py
BSd3v Sep 12, 2025
1b4d0d3
fixing another type check
BSd3v Sep 12, 2025
f867f98
fixing for lint
BSd3v Sep 13, 2025
0ed81ce
fixing failing test
BSd3v Sep 13, 2025
6bd342a
fixing issue with fastapi and component suites
BSd3v Sep 13, 2025
b1c9953
adjustments to fix issues with caller_name and init the app a couple …
BSd3v Sep 13, 2025
bd40b56
adjustments for failing tests
BSd3v Sep 13, 2025
4e50430
format dash
BSd3v Sep 13, 2025
0d32e65
removing `FlaskDashServer` from import and using `get_backend('flask'…
BSd3v Sep 14, 2025
1b3f61e
reverting change to callable(title) process
BSd3v Sep 14, 2025
c6805b5
fixing for lint
BSd3v Sep 14, 2025
8c78089
adding custom error handling per backend, tests and adjustments to th…
BSd3v Sep 16, 2025
5211f6f
adjusments for formatting
BSd3v Sep 16, 2025
6a34208
adjustment to retest backend
BSd3v Sep 16, 2025
1a2b531
adding missing reqs association
BSd3v Sep 16, 2025
465e45e
fixing minor linting issues
BSd3v Sep 16, 2025
c43a583
Add global Request Adapter (#6)
chgiesse Sep 17, 2025
c4795ed
fixes for failing tests
BSd3v Sep 17, 2025
567d0f8
fixing formatting
BSd3v Sep 17, 2025
a855c6d
fixing issues
BSd3v Sep 17, 2025
79afb0b
fixing async validation
BSd3v Sep 17, 2025
77e22a3
adjustments for request_adapter
BSd3v Sep 17, 2025
f7331d3
adding test for custom dash server
BSd3v Sep 17, 2025
8b58cf4
fixing issue with `request_adapter`
BSd3v Sep 17, 2025
b7d4af2
adjusting error handling for fastapi
BSd3v Sep 17, 2025
4cf4686
adjustments for handling issues with `debug` for `fastapi`
BSd3v Sep 17, 2025
dfe0ac7
fixing for lint
BSd3v Sep 17, 2025
cd02cc5
adjustment for delayed config
BSd3v Sep 18, 2025
16b3c9e
fix typing error
BSd3v Sep 18, 2025
493d150
fixes for pages
BSd3v Sep 22, 2025
26f01b2
Merge branch 'dev' into bring-your-own-server
BSd3v Oct 29, 2025
a10f86b
Decouple flask (#7)
chgiesse Nov 12, 2025
02e0be5
Merge branch 'dev' into bring-your-own-server
BSd3v Nov 12, 2025
39b1096
Merge branch 'dev' into bring-your-own-server
BSd3v Nov 13, 2025
acc0179
Merge branch 'dev' into bring-your-own-server
BSd3v Nov 19, 2025
99f9ad6
Merge remote-tracking branch 'remote/dev' into bring-your-own-server
BSd3v Jan 24, 2026
3e22e93
Update dash/backends/_utils.py
BSd3v Jan 24, 2026
f5dfc07
updates for formatting
BSd3v Jan 24, 2026
ac2ef7d
Merge branch 'bring-your-own-server' of github.com:BSd3v/dash into br…
BSd3v Jan 24, 2026
907aba2
adjusting favicon to be consistent between all and using `make_respon…
BSd3v Jan 24, 2026
9852bf6
renaming `dispatch` to `serve_callback`
BSd3v Jan 24, 2026
d961899
adding a config description for `debug=True`
BSd3v Jan 24, 2026
8f03875
fastapi requires `server` to be defined
BSd3v Jan 24, 2026
c87e1a7
changing import errors
BSd3v Jan 24, 2026
cad3cba
making the path name for the config file more dynamic in order to not…
BSd3v Jan 24, 2026
ee1e611
Update dash/backends/_quart.py
BSd3v Jan 26, 2026
476d1dd
adjustments for fastapi to use a controllable subprocess vs running w…
BSd3v Jan 26, 2026
1d26d72
fix dcc build
T4rk1n Jan 26, 2026
24e79bf
Merge branch 'dev' into bring-your-own-server
T4rk1n Feb 5, 2026
b3a47bd
fix request_adapter calls
T4rk1n Feb 5, 2026
ef9ff4f
import/lint fixes
T4rk1n Feb 5, 2026
25e1f45
fix linting
T4rk1n Feb 5, 2026
710c9d0
add missing backend abstract method
T4rk1n Feb 5, 2026
8627297
lint fix
T4rk1n Feb 5, 2026
c74278b
fix fastapi request middleware
T4rk1n Feb 6, 2026
7b91780
Merge branch 'dev' into bring-your-own-server
T4rk1n Feb 13, 2026
6294609
fix backend tests
T4rk1n Feb 16, 2026
58ad02f
fix status code make_response
T4rk1n Feb 17, 2026
11166ee
fix test number input
T4rk1n Feb 17, 2026
6d56c39
wait for input false first
T4rk1n Feb 17, 2026
3209a63
fix fastapi run to auto resolve instance
T4rk1n Feb 17, 2026
2e17d11
Disable route logging for quart & fastapi
T4rk1n Feb 17, 2026
2a2f45c
fix test ini
T4rk1n Feb 18, 2026
8918026
Merge branch 'dev' into bring-your-own-server
T4rk1n Feb 18, 2026
31493de
fastapi config from env, refactor middlewares
T4rk1n Feb 19, 2026
f8c8983
add docstring to base server
T4rk1n Feb 19, 2026
6e616f5
fix fastapi traceback debugger
T4rk1n Feb 19, 2026
a263af2
allowing a common method for cookies and headers on a new response_ad…
BSd3v Feb 19, 2026
b78853a
fix for lint
BSd3v Feb 19, 2026
7d7321c
fix for lint
BSd3v Feb 19, 2026
dd0d8e2
fix for lint
BSd3v Feb 19, 2026
2bd80f4
fix for lint
BSd3v Feb 19, 2026
20fb94f
adding tests for cookies and headers
BSd3v Feb 19, 2026
7f220aa
allowing for header test
BSd3v Feb 20, 2026
a9d55c1
adjustments for append and set methods of headers, and adjusting the …
BSd3v Feb 20, 2026
eb7a126
Merge branch 'dev' into bring-your-own-server
BSd3v Feb 20, 2026
d7bc663
Merge pull request #3430 from BSd3v/bring-your-own-server
T4rk1n Feb 20, 2026
c820fee
version 4.1.0rc0
T4rk1n Feb 23, 2026
e3939d8
Update dash.py
LiamConnors Feb 23, 2026
b584e4b
Merge branch 'v4.1' into update-docs
LiamConnors Feb 23, 2026
5481f09
remove global backends.backend
T4rk1n Feb 24, 2026
d8501c3
Merge pull request #3622 from plotly/update-docs
T4rk1n Feb 24, 2026
10d0e34
Merge branch 'v4.1' into fix-global-backend
T4rk1n Feb 24, 2026
c4ac323
merge with dev
T4rk1n Feb 26, 2026
1539c85
Merge branch 'v4.1' into fix-global-backend
T4rk1n Feb 26, 2026
afcbc0d
Merge pull request #3626 from plotly/fix-global-backend
T4rk1n Feb 26, 2026
d95ddc3
fixing issue where FastAPI would not allow new paths to be added
BSd3v Mar 17, 2026
98ba64e
fix lint
T4rk1n Apr 7, 2026
6931953
Merge branch 'dev' into v4.1-fix-FastAPI-paths
T4rk1n Apr 7, 2026
cd0d46a
Merge branch 'dev' into v4.1-fix-FastAPI-paths
T4rk1n Apr 9, 2026
3427cdb
Merge pull request #3668 from BSd3v/v4.1-fix-FastAPI-paths
T4rk1n Apr 9, 2026
c9e23cc
fix fastapi websocket
T4rk1n Apr 10, 2026
0af47f1
remove leftover prints
T4rk1n Apr 10, 2026
62cdcaf
Merge pull request #3734 from plotly/fix/fastapi-websocket
T4rk1n Apr 13, 2026
cac28e4
version 4.2.0rc0
T4rk1n Apr 13, 2026
4ff49b5
update changelog
T4rk1n Apr 13, 2026
9b38d60
Merge branch 'dev' into v4.2
T4rk1n Apr 14, 2026
312c6e3
update ai docs to include backends
T4rk1n Apr 14, 2026
2148fbb
Add websocket callbacks
T4rk1n Apr 14, 2026
ad3693e
websocket flag for individual callbacks
T4rk1n Apr 14, 2026
1a20893
ensure connected for ws callbacks
T4rk1n Apr 14, 2026
aff6dee
websocket origin validation
T4rk1n Apr 14, 2026
a4f10fd
add close method to DashWebsocket
T4rk1n Apr 14, 2026
206c9d8
add websocket hooks
T4rk1n Apr 14, 2026
fed2311
Add websocket inactivity disconnect
T4rk1n Apr 16, 2026
7d01f53
no storing of rendererId in session storage
T4rk1n Apr 16, 2026
b91c5d5
rename allowed_websocket_origins -> websocket_allowed_origins
T4rk1n Apr 16, 2026
96824a9
update architecture docs with websocket details
T4rk1n Apr 17, 2026
c5c0b9b
T4rk1n Apr 23, 2026
290ba68
Merge branch 'v4.2' into websocket-callbacks
T4rk1n Apr 23, 2026
3a14ef3
add websocket callback validation and tests
T4rk1n Apr 23, 2026
2ba5557
fixes
T4rk1n Apr 23, 2026
104a71d
add quart websocket callback implementation
T4rk1n Apr 24, 2026
2070708
fix tests
T4rk1n Apr 24, 2026
750a585
remove dev bundle reference
T4rk1n Apr 24, 2026
deda670
version 4.2.0rc1
T4rk1n Apr 24, 2026
e4849eb
Fix websocket callback set_props() with Patch object problems
CNFeffery Apr 26, 2026
70cbf48
Add websocket callback set_props patch tests
CNFeffery Apr 26, 2026
68a696a
Update CHANGELOG
CNFeffery Apr 26, 2026
65f3dc2
Format code
CNFeffery Apr 26, 2026
6460335
Fix websocket callback update component prop via set_props()
CNFeffery Apr 26, 2026
4b19d9a
Add websocket callback update component prop tests
CNFeffery Apr 26, 2026
411b467
Add websocket callback update component prop tests
CNFeffery Apr 26, 2026
1abd7bf
Update CHANGELOG
CNFeffery Apr 27, 2026
96af07d
Enhance websocket set_props with plotly JSON for full prop type compa…
CNFeffery Apr 28, 2026
649eadb
Fix format
CNFeffery Apr 28, 2026
c7b3f74
Optimize websocket set_props by centralizing serialization with _send…
CNFeffery Apr 28, 2026
a8fbd57
Merge pull request #3759 from CNFeffery/websocket-callbacks
T4rk1n Apr 30, 2026
d2616a5
Merge branch 'dev' into v4.2
T4rk1n Apr 30, 2026
fe5489d
Merge branch 'v4.2' into websocket-callbacks
T4rk1n Apr 30, 2026
8b86163
threadpool for ws callback execution
T4rk1n May 1, 2026
727626d
move websocket code out of base_server
T4rk1n May 1, 2026
86e3263
add future annotations
T4rk1n May 1, 2026
e4703ea
rejects all pending callbacks when a DISCONNECTED message is received
T4rk1n May 1, 2026
379e847
reset retryCount on connection
T4rk1n May 1, 2026
bf7e97f
Version 4.2.0rc2
T4rk1n May 1, 2026
c35e6ad
better handling of disconnect for persistent callbacks
T4rk1n May 4, 2026
ceaea5b
silence websocket disconnected
T4rk1n May 4, 2026
6a72fe9
reset retry count onn connection
T4rk1n May 5, 2026
5825c2d
fastapi requirement uvicorn[standard]
T4rk1n May 5, 2026
af730a8
Merge pull request #3742 from plotly/websocket-callbacks
T4rk1n May 6, 2026
7ba747a
fix infinite loading with persitent keyword on callbacks
T4rk1n May 8, 2026
2bdb5da
fix initial no output callbacks
T4rk1n May 8, 2026
9c76a17
support no output/no inputs callbacks
T4rk1n May 8, 2026
b1a6f0f
adapt test for new behavior
T4rk1n May 11, 2026
512e119
rename ctx.get_websocket to ctx.websocket
T4rk1n May 11, 2026
995cb1d
reduce initial special callbacks
T4rk1n May 12, 2026
4b2b1a8
merge dev
T4rk1n May 12, 2026
ff8c91c
Merge branch 'v4.2' into persistent-callbacks
T4rk1n May 12, 2026
78cf94a
improved callback id logic for no input/output
T4rk1n May 12, 2026
f1b6306
Merge pull request #3771 from plotly/persistent-callbacks
T4rk1n May 12, 2026
64056cf
Version 4.2.0rc3
T4rk1n May 12, 2026
5b2088c
remove test apps
T4rk1n May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
323 changes: 317 additions & 6 deletions .ai/ARCHITECTURE.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .ai/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ pip install -e .[ci,dev,testing,celery,diskcache]
npm ci
```

### Optional Backend Dependencies

```bash
# For Quart backend (ASGI async)
pip install dash[quart]

# For FastAPI backend (ASGI async)
pip install dash[fastapi]

# For async callbacks with Flask
pip install dash[async]
```

## Building

```bash
Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
outputs:
table_paths_changed: ${{ steps.filter.outputs.table_related_paths }}
background_cb_changed: ${{ steps.filter.outputs.background_paths }}
backend_cb_changed: ${{ steps.filter.outputs.backend_paths }}
dcc_paths_changed: ${{ steps.filter.outputs.dcc_related_paths }}
html_paths_changed: ${{ steps.filter.outputs.html_related_paths }}
websocket_changed: ${{ steps.filter.outputs.websocket_paths }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -44,6 +46,21 @@ jobs:
- 'tests/background_callback/**'
- 'tests/async_tests/**'
- 'requirements/**'
backend_paths:
- 'dash/backends/**'
- 'tests/backend_tests/**'
websocket_paths:
- 'dash/backends/_fastapi.py'
- 'dash/backends/_quart.py'
- 'dash/backends/base_server.py'
- 'dash/_callback.py'
- 'dash/_callback_context.py'
- 'dash/_hooks.py'
- 'dash/dash.py'
- '@dash-websocket-worker/**'
- 'dash/dash-renderer/src/**'
- 'tests/websocket/**'
- 'requirements/**'

lint-unit:
name: Lint & Unit Tests (Python ${{ matrix.python-version }})
Expand Down Expand Up @@ -329,6 +346,80 @@ jobs:
path: bgtests/test-reports/
retention-days: 7

backend-tests:
name: Run Backend Callback Tests (Python ${{ matrix.python-version }})
needs: [build, changes_filter]
if: |
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) ||
needs.changes_filter.outputs.backend_cb_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12"]

services:
redis:
image: redis:6
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

env:
REDIS_URL: redis://localhost:6379
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt

- name: Download built Dash packages
uses: actions/download-artifact@v4
with:
name: dash-packages
path: packages/

- name: Install Dash packages
run: |
python -m pip install --upgrade pip wheel
python -m pip install "setuptools<80.0.0"
find packages -name dash-*.whl -print -exec sh -c 'pip install "{}[async,ci,testing,dev,celery,diskcache,fastapi,quart]"' \;

- name: Setup Chrome and ChromeDriver
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable

- name: Build/Setup test components
run: npm run setup-tests.py

- name: Run Backend Callback Tests
run: |
mkdir bgtests
cp -r tests bgtests/tests
cd bgtests
touch __init__.py
pytest --headless --nopercyfinalize tests/backend_tests -v -s

table-unit:
name: Table Unit/Lint Tests (Python ${{ matrix.python-version }})
needs: [build, changes_filter]
Expand Down Expand Up @@ -451,6 +542,67 @@ jobs:
path: components/dash-table/test-reports/
retention-days: 7

websocket-tests:
name: WebSocket Tests (Python ${{ matrix.python-version }})
needs: [build, changes_filter]
if: |
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) ||
needs.changes_filter.outputs.websocket_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt

- name: Download built Dash packages
uses: actions/download-artifact@v4
with:
name: dash-packages
path: packages/

- name: Install Dash packages
run: |
python -m pip install --upgrade pip wheel
python -m pip install "setuptools<80.0.0"
find packages -name dash-*.whl -print -exec sh -c 'pip install "{}[ci,testing,dev,fastapi,quart]"' \;

- name: Setup Chrome and ChromeDriver
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable

- name: Build/Setup test components
run: npm run setup-tests.py

- name: Run WebSocket tests
run: |
mkdir wstests
cp -r tests wstests/tests
cd wstests
touch __init__.py
pytest --headless --nopercyfinalize tests/websocket -v -s

test-main:
name: Main Dash Tests (Python ${{ matrix.python-version }}, Group ${{ matrix.test-group }})
needs: build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ packages/
!components/dash-core-components/tests/integration/upload/upload-assets/upft001.csv
!components/dash-table/tests/assets/*.csv
!components/dash-table/tests/selenium/assets/*.csv
dash_config.json
3 changes: 3 additions & 0 deletions @plotly/dash-websocket-worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dash websocket worker

Worker for websocket based callbacks.
29 changes: 29 additions & 0 deletions @plotly/dash-websocket-worker/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@plotly/dash-websocket-worker",
"version": "1.0.0",
"description": "SharedWorker for WebSocket-based Dash callbacks",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "webpack --mode production",
"build:dev": "webpack --mode development",
"watch": "webpack --mode development --watch",
"clean": "rm -rf dist"
},
"files": [
"dist"
],
"keywords": [
"dash",
"websocket",
"sharedworker"
],
"author": "Plotly",
"license": "MIT",
"devDependencies": {
"typescript": "^5.0.0",
"webpack": "^5.0.0",
"webpack-cli": "^5.0.0",
"ts-loader": "^9.0.0"
}
}
Loading
Loading