Skip to main content

A plugin to conveniently change the CDN source for Dash applications using Dash Hooks.

Project description

dash-change-cdn-plugin

GitHub PyPI Ruff

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.

Installation

pip install dash-change-cdn-plugin

Usage

import 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...

Example

Run the included example:

python example.py

API Reference

setup_change_cdn_plugin()

This 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".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dash_change_cdn_plugin-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dash_change_cdn_plugin-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file dash_change_cdn_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: dash_change_cdn_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for dash_change_cdn_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 75cebd6ea51c8e4cd36cfd353b19fe6c5872ba3aef3cb697f57ddb2a016f1e76
MD5 3f8ff987ab7994db5fba96cec96a3c1a
BLAKE2b-256 4e0e38960f8a39f76768f5a8f27b831d9eb4257c80fcbb1dd23451a6670bd431

See more details on using hashes here.

File details

Details for the file dash_change_cdn_plugin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dash_change_cdn_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db5c4986275e6d6689b15e82959dbd40ee57f189865430ad98f4aa0140ca2761
MD5 7ca3ecdc2f3002ad7d8820188ed4d265
BLAKE2b-256 d489c924634b3435601e2fb9696d4792482abd8046dfb597ea0fd704f6cbfb3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page