Skip to main content

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

dash_offline_detect_plugin-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

dash_offline_detect_plugin-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dash_offline_detect_plugin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 915d5d369ba2b3f6aeaab1767188b44a8ba4d889b1cd6088ee5d6146bbebfeba
MD5 2c703a5ec0ddb0aaaa72f2decfce9a0b
BLAKE2b-256 1c7d88c9356dd946ec13fbef8b0108831c99f82741a40bf32412a5e4df4acd16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dash_offline_detect_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a725793ed910dec3263d63f13c22934edf025230d30bd01a12d824b31609f25b
MD5 7283dbb0145d91ea1781a8f306aaa0c9
BLAKE2b-256 b12211bc7c98909223521ffea88c90ec35a7c9373ffb78d8cbe580863d99ec2d

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