Skip to main content

A plugin to offer offline detect for Dash applications using Dash Hooks.

Project description

dash-offline-detect-plugin

GitHub PyPI Ruff

English | 简体中文

Offline detect plugin for Dash applications using Dash Hooks.

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.4.tar.gz (4.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_offline_detect_plugin-0.1.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dash_offline_detect_plugin-0.1.4.tar.gz
Algorithm Hash digest
SHA256 be5dc08df270bed0fc134d5a715a4eb7a2eb6c1afcd39083ca4e18ba63bb81a0
MD5 6ecd918a630a325273c3e4bf0a662f6a
BLAKE2b-256 1f8963ed995067de9ca40a9f14961d6dffff5d06d5414608147daf3dcbc160fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dash_offline_detect_plugin-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 de9ac90ba16beb05b5e8725ede8c458951bf4a864dbc53ff9cd150e152311d13
MD5 07ec01688cfa2811ad983e4bcdc206ed
BLAKE2b-256 3e539086771904cde9c9d331634c4d74d4d7b504c9bd2d4d9757e58721bd9019

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