Registry / web-framework / dash-extensions

dash-extensions

JSON →
library2.0.6pypypi✓ verified 24d ago

The `dash-extensions` package is a comprehensive collection of utility functions, syntax extensions, and custom components designed to enhance the Plotly Dash development experience. It provides features like server-side caching, enhanced callbacks (e.g., blocking, multiplexing, server-side outputs), JavaScript interoperability, and enriched Dash components. Currently at version 2.0.5, the library maintains an active and regular release cadence, with multiple patch and major version updates throughout the year to introduce new features and address breaking changes in underlying libraries like Dash.

pip install dash-extensions
INSTALL
IMPORT
SIG · DASH-EXTENSIONS
D
dash-extensions
web-frameworkpythonv2.0.6
Install
8.6s avg
Import
1361ms
Disk
153MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.20 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.408s · 148.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.6s · import 1.314s · 148MB
153MB installed
● package 153MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DashProxy
from dash_extensions.enrich import DashProxy
from dash import Dash
Use `DashProxy` from `dash_extensions.enrich` to enable many of the library's advanced features and transforms.
Lottie
from dash_extensions import Lottie
Components provided by `dash-extensions` are often imported directly from the top-level package.
assign
from dash_extensions.javascript import assign
Functions for JavaScript interoperability are found in the `javascript` module.
html
from dash_extensions.enrich import html
from dash import html
When using `DashProxy` from `dash_extensions.enrich`, it's recommended to import core Dash components (like `html`, `dcc`, `Input`, `Output`) also from `dash_extensions.enrich` to ensure full compatibility with enriched features and transforms.
ServersideOutput
from dash_extensions.enrich import ServersideOutput

This minimal example demonstrates how to create a basic Dash application using `DashProxy` from `dash-extensions.enrich` and incorporate a custom `Lottie` component for animated visuals. The `Lottie` component fetches an animation from a URL and displays it, showcasing easy integration of extended functionalities.

import dash_html_components as html # Kept for general compatibility from dash_extensions import Lottie from dash_extensions.enrich import DashProxy app = DashProxy() app.layout = html.Div([ html.H1("Dash-Extensions Lottie Example"), Lottie( options=dict( loop=True, autoplay=True, style=dict(width="25%", margin="auto"), ), url="https://assets6.lottiefiles.com/packages/lf20_rwwvwgka.json", ) ]) if __name__ == "__main__": app.run_server(debug=True)
Debug
Known issues
breakingVersion 2.0.0 introduced significant breaking changes, primarily requiring Dash 3.0.2 or later. Ensure your core Dash library is updated to avoid compatibility issues. Older `LogTransform`, `NoOutputTransform`, and the `dataiku` module were removed.
fix
Upgrade Dash to >=3.0.2. Replace `LogTransform` usage with the new `dash_extensions.logging` module. Remove `NoOutputTransform` as Dash 2.17.0+ supports callbacks without outputs. Remove usage of the `dataiku` module.
affects: >=2.0.0
breakingThe `Lottie` component's interface changed in `2.0.0`. Style arguments like `width` or `height` can no longer be passed directly as keyword arguments but must be nested within the `style` dictionary inside the `options` property.
fix
Refactor Lottie component usage: `Lottie(options=dict(style=dict(width='25%', margin='auto')), ...)` instead of `Lottie(style=dict(width='25%', margin='auto'), ...)` or `Lottie(width='25%', ...)` (if it ever supported direct `width`).
affects: >=2.0.0
breakingIn version 1.0.0, the `ServersideOutputTransform` syntax changed. Instead of replacing `Output` with `ServersideOutput`, you must now wrap the return values of your callback in a `Serverside` object.
fix
Update callbacks using `ServersideOutputTransform` to wrap return values: `return Serverside(my_data)` instead of relying on the `Output` replacement.
affects: >=1.0.0 <2.0.0
breakingThe `OperatorTransform` was removed in version 1.0.0 as similar functionality became available natively in Dash 2.9 through partial property updates.
fix
Migrate any `OperatorTransform` usage to Dash 2.9's partial property updates for similar functionality.
affects: >=1.0.0 <2.0.0
gotchaFor many of the advanced features and 'transforms' provided by `dash-extensions` (like `BlockingCallbackTransform`, `ServersideOutputTransform`, `BaseModelTransform`), you must use `DashProxy` imported from `dash_extensions.enrich` instead of the standard `dash.Dash` app object.
fix
Always import `DashProxy` with `from dash_extensions.enrich import DashProxy` when leveraging `dash-extensions`' advanced functionalities.
affects: All
gotchaWhen using `DashProxy` from `dash_extensions.enrich`, it's generally recommended to import core Dash components (e.g., `html`, `dcc`, `Input`, `Output`, `State`) directly from `dash_extensions.enrich` as well. Importing them from the standard `dash` package might prevent them from benefiting from certain enrichments or transformations.
fix
Adjust import statements: `from dash_extensions.enrich import html, dcc, Input, Output` instead of `from dash import html, dcc, Input, Output`.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dash_extensions.websockets'
The `websockets` sub-module of `dash-extensions` or its underlying dependencies (like `flask-sockets`) are not correctly installed or are incompatible with the current Flask/Python environment, often after environment changes.
fix
Ensure `dash-extensions` is installed (`pip install dash-extensions`). If using `conda`, install it via `conda install -c conda-forge dash-extensions`. For WebSocket functionality, also ensure `flask-sockets` (or `flask-sock` for Flask 2.0+) is installed and compatible with your Flask version.
InvalidCallbackReturnValue: The callback for [...] returned a value having type DataFrame which is not JSON serializable.
This error indicates that a callback is returning a non-JSON-serializable object (e.g., a Pandas DataFrame), but the `ServersideOutputTransform` is not properly configured or recognized, especially when using `@dash.callback` instead of `@app.callback` or `from dash_extensions.enrich import callback` with `DashProxy` in multi-page apps.
fix
Initialize your app with `DashProxy(transforms=[ServersideOutputTransform()])`. For callbacks, use `from dash_extensions.enrich import callback` and decorate your callback with `@callback`. Ensure the non-JSON-serializable output is wrapped with `Serverside()` (e.g., `return Serverside(my_dataframe)`).
Duplicate callback outputs
Multiple callbacks are attempting to update the same output component property, which is disallowed by Dash. While `MultiplexerTransform` is designed to mitigate this, it may not be correctly applied or might still occur in specific scenarios, such as with certain client-side callbacks or older library versions.
fix
Ensure `MultiplexerTransform` is included in your `DashProxy` initialization: `app = DashProxy(transforms=[MultiplexerTransform()])`. If the issue persists, verify all callbacks are correctly managed by `dash-extensions` and consider if merging related callbacks or using `dash.no_update` is appropriate.
AttributeError: 'Output' object has no attribute 'backend'
This error typically occurs when using `ServersideOutput` with memoization, often due to an incompatibility with the `flask-caching` library or corrupted/outdated cached data, particularly in older versions of `dash-extensions`.
fix
Upgrade both `dash` and `dash-extensions` to their latest versions (`pip install -U dash dash-extensions`). Additionally, clear any existing cache files or directories created by `flask-caching` (e.g., by deleting the cache folder on disk) to remove potentially corrupt data.
Upgrade
Version history
2.0.6latest on PyPI · released Jul 16, 2026
Audit
Dependencies
dashrequiredCore dependency for building Dash applications.
dataclass-wizardrequiredUsed for automated serialization/deserialization of Pydantic models via BaseModelTransform.
flask-cachingrequiredUsed for server-side caching and performance improvements.
jsbeautifierrequiredPotentially used for formatting JavaScript generated by inline JS features.
more-itertoolsrequiredGeneral utility functions.
pydanticrequiredUsed for automated serialization/deserialization of Pydantic models via BaseModelTransform.
Agent activity
9 hits · last 30 days
node
6
Resources
dash-extensions — pip install dash-extensions · libregistry