English | 简体中文
CDN source changing plugin for Dash applications using Dash Hooks, This plugin allows you to switch between different CDN sources for your Dash app's static resources.
pip install dash-change-cdn-pluginimport dash
# Import the change cdn plugin
from dash_change_cdn_plugin import setup_change_cdn_plugin
# Enable the change cdn plugin for the current app
setup_change_cdn_plugin()
# Remember to set serve_locally=False
app = dash.Dash(__name__, serve_locally=False)
# Rest of your app code...Run the included example:
python example.pyThis function enables the CDN source changing feature for your Dash application.
| Parameter | Type | Default | Description |
|---|---|---|---|
cdn_source |
Literal["npmmirror", "jsdelivr", "fastly-jsdelivr"] |
"npmmirror" |
The CDN source to use for static resources. Options are: "npmmirror", "jsdelivr", "fastly-jsdelivr". |
