Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
fe6b30a
allowing callbacks to be exposed as api's by providing a endpoint.
BSd3v Jun 27, 2025
d177dcf
change `api_path` -> `api_endpoint`
BSd3v Jun 27, 2025
90cf329
Merge branch 'dev' into api-exposure-callbacks
BSd3v Jul 9, 2025
c2dd48b
Merge branch 'dev' into api-exposure-callbacks
T4rk1n Aug 18, 2025
5dde871
Update CITATION.cff
Coding-with-Adam Aug 19, 2025
0b5d3fb
Merge branch 'dev' into Coding-with-Adam-patch-1
Coding-with-Adam Aug 21, 2025
b7fcc04
Bump sha.js from 2.4.11 to 2.4.12 in /dash/dash-renderer
dependabot[bot] Aug 21, 2025
f649e8d
Merge pull request #3409 from plotly/dependabot/npm_and_yarn/dash/das…
T4rk1n Aug 22, 2025
6afd6f9
Merge pull request #3406 from plotly/Coding-with-Adam-patch-1
gvwilson Aug 22, 2025
90fa4c3
Fix #3366
CNFeffery Aug 26, 2025
d339423
Update CHANGELOG.md
CNFeffery Aug 26, 2025
ae473a6
Update the judgment conditions for no_update
CNFeffery Aug 26, 2025
89a08e7
Merge pull request #3415 from CNFeffery/dev
T4rk1n Aug 26, 2025
733e085
fix: migrate Jupyter integration from deprecated ipykernel.comm to co…
R3myG Aug 31, 2025
2a9477e
Update Dash HTML elements & attributes.
T4rk1n Sep 1, 2025
973a23c
brings patch to side-updates and allows for use in clientside
BSd3v Sep 1, 2025
f7764d9
moving location of component test
BSd3v Sep 1, 2025
7191e83
Merge branch 'dev2' into api-exposure-callbacks
BSd3v Sep 1, 2025
9bb570b
adding test and docstring
BSd3v Sep 1, 2025
51054a9
Remove print in async get_app
T4rk1n Sep 2, 2025
49eccdf
Merge pull request #3426 from plotly/fix-get-app-print
T4rk1n Sep 2, 2025
dbfb8d8
fixing issue with sideUpdates and not passing the `getComponentLayout…
BSd3v Sep 2, 2025
9d369b6
fixing for lint
BSd3v Sep 2, 2025
a0beaa4
fix for lint
BSd3v Sep 2, 2025
69bc4b0
Merge branch 'dev' into create-pull-request/patch
T4rk1n Sep 2, 2025
ef6bcf6
Merge pull request #3422 from plotly/create-pull-request/patch
T4rk1n Sep 2, 2025
d2e1ea1
adding tests for side updates
BSd3v Sep 2, 2025
4919d89
adding changelog
BSd3v Sep 2, 2025
b34673a
Merge branch 'dev' into patch-sideupdates
BSd3v Sep 2, 2025
a157deb
fixing issue with side-updates from background callbacks
BSd3v Sep 2, 2025
f0165d3
Merge branch 'dev' into fix-jupyter-deprecation-warning
T4rk1n Sep 3, 2025
562a574
Merge pull request #3423 from R3myG/fix-jupyter-deprecation-warning
T4rk1n Sep 3, 2025
d541e37
adjustments for `outputValue===undefined` eg (`no_update`)
BSd3v Sep 3, 2025
3bacb8c
adjusting flaky test for typing speed
BSd3v Sep 3, 2025
4b3d2e1
Merge branch 'dev' into patch-sideupdates
BSd3v Sep 3, 2025
9c59ab5
fixing for lint
BSd3v Sep 3, 2025
fb5b890
fixing clientside parsing to be the same as serverside
BSd3v Sep 3, 2025
3b8512c
fixing for lint
BSd3v Sep 4, 2025
bd5afc0
Merge branch 'dev' into api-exposure-callbacks
BSd3v Sep 4, 2025
c42d732
removing commented out console error
BSd3v Sep 4, 2025
ed91bd6
Adjustment to only use the `GLOBAL_API_PATHS`
BSd3v Sep 8, 2025
7835b33
adding better doc string
BSd3v Sep 8, 2025
52d5ffd
adding changelog
BSd3v Sep 8, 2025
bac3f36
Merge pull request #3347 from BSd3v/api-exposure-callbacks
T4rk1n Sep 8, 2025
bee2154
Merge branch 'dev' into patch-sideupdates
BSd3v Sep 8, 2025
4b8917e
Merge pull request #3424 from BSd3v/patch-sideupdates
T4rk1n Sep 9, 2025
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- [#3395](https://github.com/plotly/dash/pull/3396) Add position argument to hooks.devtool
- [#3403](https://github.com/plotly/dash/pull/3403) Add app_context to get_app, allowing to get the current app in routes.
- [#3407](https://github.com/plotly/dash/pull/3407) Add `hidden` to callback arguments, hiding the callback from appearing in the devtool callback graph.
- [#3424](https://github.com/plotly/dash/pull/3424) Adds support for `Patch` on clientside callbacks class `dash_clientside.Patch`, as well as supporting side updates, eg: (Running, SetProps).
- [#3347](https://github.com/plotly/dash/pull/3347) Added 'api_endpoint' to `callback` to expose api endpoints at the provided path for use to be executed directly without dash.

## Fixed
- [#3395](https://github.com/plotly/dash/pull/3395) Fix Components added through set_props() cannot trigger related callback functions. Fix [#3316](https://github.com/plotly/dash/issues/3316)
- [#3397](https://github.com/plotly/dash/pull/3397) Add optional callbacks, suppressing callback warning for missing component ids for a single callback.
- [#3415](https://github.com/plotly/dash/pull/3415) Fix the error triggered when only a single no_update is returned for client-side callback functions with multiple Outputs. Fix [#3366](https://github.com/plotly/dash/issues/3366)
- [#3416](https://github.com/plotly/dash/issues/3416) Fix DeprecationWarning in dash/_jupyter.py by migrating from deprecated ipykernel.comm.Comm to comm module

## [3.2.0] - 2025-07-31

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors:
given-names: "Alex"
orcid: https://orcid.org/0000-0003-4623-4147
title: "A data and analytics web app framework for Python, no JavaScript required."
version: 2.18.2
version: 3.2.0
doi: 10.5281/zenodo.14182630
date-released: 2024-11-04
date-released: 2025-07-31
url: https://github.com/plotly/dash
32 changes: 13 additions & 19 deletions components/dash-html-components/scripts/data/attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,8 @@
"button",
"fieldset",
"input",
"label",
"meter",
"object",
"output",
"progress",
"select",
"textarea"
],
Expand Down Expand Up @@ -993,28 +990,13 @@
"target"
],
"label": [
"htmlFor",
"form"
"htmlFor"
],
"output": [
"htmlFor",
"form",
"name"
],
"meter": [
"form",
"high",
"low",
"max",
"min",
"optimum",
"value"
],
"progress": [
"form",
"max",
"value"
],
"canvas": [
"height",
"width"
Expand All @@ -1025,6 +1007,14 @@
"type",
"width"
],
"meter": [
"high",
"low",
"max",
"min",
"optimum",
"value"
],
"base": [
"href",
"target"
Expand All @@ -1035,6 +1025,10 @@
"marquee": [
"loop"
],
"progress": [
"max",
"value"
],
"source": [
"media",
"sizes",
Expand Down
21 changes: 20 additions & 1 deletion dash/_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def _invoke_callback(func, *args, **kwargs): # used to mark the frame for the d
GLOBAL_CALLBACK_LIST = []
GLOBAL_CALLBACK_MAP = {}
GLOBAL_INLINE_SCRIPTS = []
GLOBAL_API_PATHS = {}


# pylint: disable=too-many-locals,too-many-arguments
Expand All @@ -77,6 +78,7 @@ def callback(
cache_args_to_ignore: Optional[list] = None,
cache_ignore_triggered=True,
on_error: Optional[Callable[[Exception], Any]] = None,
api_endpoint: Optional[str] = None,
optional: Optional[bool] = False,
hidden: Optional[bool] = False,
**_kwargs,
Expand Down Expand Up @@ -165,6 +167,14 @@ def callback(
Mark all dependencies as not required on the initial layout checks.
:param hidden:
Hide the callback from the devtools callbacks tab.
:param api_endpoint:
If provided, the callback will be available at the given API endpoint.
This allows you to call the callback directly through HTTP requests
instead of through the Dash front-end. The endpoint should be a string
that starts with a forward slash (e.g. `/my_callback`).
The endpoint is relative to the Dash app's base URL.
Note that the endpoint will not appear in the list of registered
callbacks in the Dash devtools.
"""

background_spec = None
Expand Down Expand Up @@ -219,6 +229,7 @@ def callback(
manager=manager,
running=running,
on_error=on_error,
api_endpoint=api_endpoint,
optional=optional,
hidden=hidden,
)
Expand Down Expand Up @@ -587,7 +598,11 @@ def _prepare_response(

# pylint: disable=too-many-branches,too-many-statements
def register_callback(
callback_list, callback_map, config_prevent_initial_callbacks, *_args, **_kwargs
callback_list,
callback_map,
config_prevent_initial_callbacks,
*_args,
**_kwargs,
):
(
output,
Expand Down Expand Up @@ -642,6 +657,10 @@ def register_callback(

# pylint: disable=too-many-locals
def wrap_func(func):
if _kwargs.get("api_endpoint"):
api_endpoint = _kwargs.get("api_endpoint")
GLOBAL_API_PATHS[api_endpoint] = func

if background is None:
background_key = None
else:
Expand Down
1 change: 0 additions & 1 deletion dash/_get_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def with_app_context_async(func):
async def wrap(self, *args, **kwargs):
app_context.set(self)
ctx = copy_context()
print("copied and set")
return await ctx.run(func, self, *args, **kwargs)

return wrap
Expand Down
30 changes: 21 additions & 9 deletions dash/_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
from IPython.core.display import HTML
from IPython.core.ultratb import FormattedTB
from retrying import retry
from ipykernel.comm import Comm
from comm import create_comm
import nest_asyncio

import requests

_dash_comm = Comm(target_name="dash")
_dash_comm = create_comm(target_name="dash")
_dep_installed = True
except ImportError:
_dep_installed = False
Expand Down Expand Up @@ -97,10 +97,14 @@ def convert(name, locals=locals, formatarg=formatarg, formatvalue=formatvalue):
def _send_jupyter_config_comm_request():
# If running in an ipython kernel,
# request that the front end extension send us the notebook server base URL
if get_ipython() is not None:
if _dash_comm.kernel is not None:
_caller["parent"] = _dash_comm.kernel.get_parent()
_dash_comm.send({"type": "base_url_request"})
ipython = get_ipython()
if (
ipython is not None
and hasattr(ipython, "kernel")
and ipython.kernel is not None
):
_caller["parent"] = ipython.kernel.get_parent()
_dash_comm.send({"type": "base_url_request"})


def _jupyter_comm_response_received():
Expand All @@ -109,7 +113,8 @@ def _jupyter_comm_response_received():

def _request_jupyter_config(timeout=2):
# Heavily inspired by implementation of CaptureExecution in the
if _dash_comm.kernel is None:
ipython = get_ipython()
if ipython is None or not hasattr(ipython, "kernel") or ipython.kernel is None:
# Not in jupyter setting
return

Expand Down Expand Up @@ -215,8 +220,15 @@ def __init__(self):
@_dash_comm.on_msg
def _receive_message(msg):
prev_parent = _caller.get("parent")
if prev_parent and prev_parent != _dash_comm.kernel.get_parent():
_dash_comm.kernel.set_parent(
ipython = get_ipython()
if (
prev_parent
and ipython is not None
and hasattr(ipython, "kernel")
and ipython.kernel is not None
and prev_parent != ipython.kernel.get_parent()
):
ipython.kernel.set_parent(
[prev_parent["header"]["session"]], prev_parent
)
del _caller["parent"]
Expand Down
28 changes: 18 additions & 10 deletions dash/dash-renderer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading