Offline detect plugin for Dash applications using Dash Hooks.
Project description
dash-offline-detect-plugin
Offline detect plugin for Dash applications using Dash Hooks. You can check out this project on PyPi at: https://pypi.org/project/dash-offline-detect-plugin
Installation
pip install dash-offline-detect-plugin
Usage
from dash import Dash
# Import the offline detect plugin
from dash_offline_detect_plugin import setup_offline_detect_plugin
# Enable the offline detect plugin for the current app
setup_offline_detect_plugin()
app = Dash(__name__)
# Rest of your app code...
Example
Run the included example:
python example.py
API Reference
setup_offline_detect_plugin()
This function enables the offline detection feature for your Dash application.
| Parameter | Type | Default | Description |
|---|---|---|---|
interval |
int |
5000 |
Interval of detection in browser (milliseconds). Controls how frequently the browser checks if the backend service is available. |
title |
str |
"Service Unavailable" |
Title of the overlay displayed when the service is unavailable. |
description |
str |
"Unable to connect to the backend service, trying to reconnect..." |
Description text displayed in the overlay when the service is unavailable. |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dash_offline_detect_plugin-0.1.2.tar.gz.
File metadata
- Download URL: dash_offline_detect_plugin-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
198834a59744d49ade66745ffc6fce55980c50612d0940a83b2f9a9ef3440f0a
|
|
| MD5 |
6487011b4ac34bed0ca3fd169fd12405
|
|
| BLAKE2b-256 |
b31776e0287cc25087af8dc353e7f85676c1daf2b8fea18cc04ec7605ee31e17
|
File details
Details for the file dash_offline_detect_plugin-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dash_offline_detect_plugin-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77f9ca507cb3e46be9d3d3cc3fc907b37f3a2242be344da31e23a0cdea8b406c
|
|
| MD5 |
17e23871bf2cdfee8a3fee39e55ba2cc
|
|
| BLAKE2b-256 |
0cf11763c2f410fd1f87ec35b81117c6138c7291c428bb3363b5d2ce6d8a71be
|