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

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.

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.1.tar.gz (3.3 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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dash_change_cdn_plugin-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 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.1.tar.gz
Algorithm Hash digest
SHA256 43217248cc043d1c0d7d21005896ade04f376ed9436c765bd76a2a0d318f6854
MD5 6faccd5895a17879cf49cf172eea6740
BLAKE2b-256 2ceddff46c2c383240e20a809f7235d2cec3064e7dff2d0c8434a0a03b12c4ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dash_change_cdn_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7f5e51813e497c52765c23793063568fc50f39c36e88be025030caf0fe57bdc
MD5 5bcd1428672a1e09977dda448389a460
BLAKE2b-256 e6da2448d083847e758e2a08bb67253f27dbe035a71b3712650f3b357c5fb7bf

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