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.2.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.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dash_offline_detect_plugin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 198834a59744d49ade66745ffc6fce55980c50612d0940a83b2f9a9ef3440f0a
MD5 6487011b4ac34bed0ca3fd169fd12405
BLAKE2b-256 b31776e0287cc25087af8dc353e7f85676c1daf2b8fea18cc04ec7605ee31e17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dash_offline_detect_plugin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77f9ca507cb3e46be9d3d3cc3fc907b37f3a2242be344da31e23a0cdea8b406c
MD5 17e23871bf2cdfee8a3fee39e55ba2cc
BLAKE2b-256 0cf11763c2f410fd1f87ec35b81117c6138c7291c428bb3363b5d2ce6d8a71be

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