dash-disable-devtool-plugin
English | 简体中文
A plugin to disable browser developer tools and other page operation permissions for Dash applications using Dash Hooks.
Installation
pip install dash-disable-devtool-plugin
Usage
from dash import Dash
# Import the disable devtool plugin
from dash_disable_devtool_plugin import setup_disable_devtool_plugin
# Enable the disable devtool plugin for the current app
setup_disable_devtool_plugin()
app = Dash(__name__)
# Rest of your app code...
Example
Run the included example. In this basic example, first of all, the normal ways to open the browser developer tools via shortcut keys will be blocked. Even if the browser developer tools are opened through other means, it will be quickly detected, and trigger the default page content clearing and rewriting.
python example.py
API Reference
setup_disable_devtool_plugin()
This function sets up the disable-devtool plugin for your Dash application, preventing users from accessing browser developer tools.
| Parameter | Type | Default | Description |
|---|---|---|---|
script_src |
str |
"https://cdn.jsdelivr.net/npm/disable-devtool" |
Source URL of the disable-devtool script. Alternative CDNs: https://unpkg.com/disable-devtool/disable-devtool.min.js, https://registry.npmmirror.com/disable-devtool/latest/files/disable-devtool.min.js |
disable_menu |
bool |
False |
Disables right-click context menu when True. |
disable_select |
bool |
False |
Disables text selection when True. |
disable_copy |
bool |
False |
Disables copy operations (Ctrl+C) when True. |
disable_cut |
bool |
False |
Disables cut operations (Ctrl+X) when True. |
disable_paste |
bool |
False |
Disables paste operations (Ctrl+V) when True. |
rewrite_html |
str |
"The current application disables debugging through developer tools." |
HTML content replacing the entire page when developer tools are detected. |
Metadata
Release files for dash-disable-devtool-plugin 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dash_disable_devtool_plugin-0.1.2.tar.gz | 3.8 kB | Without provenance | Details for dash_disable_devtool_plugin-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dash_disable_devtool_plugin-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for dash_disable_devtool_plugin-0.1.2-py3-none-any.whl |
Total release size: 8.1 kB
Release files / dash_disable_devtool_plugin-0.1.2.tar.gz
| Download URL | dash_disable_devtool_plugin-0.1.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
952d7806d32d6d1784acc23f5d46046f01d3e362a4de56479ff704b0671f60fc
|
|
BLAKE2b-256 checksum How to use checksums |
ce7c333a34e25ea24d291e827eb881419ba4d7d2538fa4a0d9200240feeb0ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / dash_disable_devtool_plugin-0.1.2-py3-none-any.whl
| Download URL | dash_disable_devtool_plugin-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27ccb8a2e2b523a3d7951d0bb56c2bd825ecbdb64d14930d4e5f5373f6f3c7e1
|
|
BLAKE2b-256 checksum How to use checksums |
0c516eb3c78fc4f22d80757bb857e0acb59762c73a017bd08d04f0822ec55659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for dash-disable-devtool-plugin 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.