{"id":3950,"library":"dash-extensions","title":"Dash Extensions","description":"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.","status":"active","version":"2.0.5","language":"en","source_language":"en","source_url":"https://github.com/emilhe/dash-extensions","tags":["Dash","Plotly","Web Development","Frontend","Extensions","Components","Utilities","Callbacks","Realtime"],"install":[{"cmd":"pip install dash-extensions","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Core dependency for building Dash applications.","package":"dash","optional":false},{"reason":"Used for automated serialization/deserialization of Pydantic models via BaseModelTransform.","package":"dataclass-wizard","optional":false},{"reason":"Used for server-side caching and performance improvements.","package":"flask-caching","optional":false},{"reason":"Potentially used for formatting JavaScript generated by inline JS features.","package":"jsbeautifier","optional":false},{"reason":"General utility functions.","package":"more-itertools","optional":false},{"reason":"Used for automated serialization/deserialization of Pydantic models via BaseModelTransform.","package":"pydantic","optional":false}],"imports":[{"note":"Use `DashProxy` from `dash_extensions.enrich` to enable many of the library's advanced features and transforms.","wrong":"from dash import Dash","symbol":"DashProxy","correct":"from dash_extensions.enrich import DashProxy"},{"note":"Components provided by `dash-extensions` are often imported directly from the top-level package.","symbol":"Lottie","correct":"from dash_extensions import Lottie"},{"note":"Functions for JavaScript interoperability are found in the `javascript` module.","symbol":"assign","correct":"from dash_extensions.javascript import assign"},{"note":"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.","wrong":"from dash import html","symbol":"html","correct":"from dash_extensions.enrich import html"},{"symbol":"ServersideOutput","correct":"from dash_extensions.enrich import ServersideOutput"}],"quickstart":{"code":"import dash_html_components as html # Kept for general compatibility \nfrom dash_extensions import Lottie\nfrom dash_extensions.enrich import DashProxy\n\napp = DashProxy()\n\napp.layout = html.Div([ \n    html.H1(\"Dash-Extensions Lottie Example\"),\n    Lottie(\n        options=dict(\n            loop=True,\n            autoplay=True,\n            style=dict(width=\"25%\", margin=\"auto\"),\n        ),\n        url=\"https://assets6.lottiefiles.com/packages/lf20_rwwvwgka.json\",\n    )\n])\n\nif __name__ == \"__main__\":\n    app.run_server(debug=True)","lang":"python","description":"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."},"warnings":[{"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.","message":"Version 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.","severity":"breaking","affected_versions":">=2.0.0"},{"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`).","message":"The `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.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update callbacks using `ServersideOutputTransform` to wrap return values: `return Serverside(my_data)` instead of relying on the `Output` replacement.","message":"In 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.","severity":"breaking","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Migrate any `OperatorTransform` usage to Dash 2.9's partial property updates for similar functionality.","message":"The `OperatorTransform` was removed in version 1.0.0 as similar functionality became available natively in Dash 2.9 through partial property updates.","severity":"breaking","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Always import `DashProxy` with `from dash_extensions.enrich import DashProxy` when leveraging `dash-extensions`' advanced functionalities.","message":"For 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.","severity":"gotcha","affected_versions":"All"},{"fix":"Adjust import statements: `from dash_extensions.enrich import html, dcc, Input, Output` instead of `from dash import html, dcc, Input, Output`.","message":"When 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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}