Async port of the official Plotly Dash library
Project description
Async Dash
async-dash
is an async port of Plotly Dash library, created by replacing its flask
backend with its async counterpart quart.
It started with my need to be able to create realtime dashboards with dash
, specifically with event-driven
architecture. Using async-dash
with components from dash-extensions
such as WebSocket, EventSource, etc. you can create truly events based dashboards.
Table Of Contents
Installation
pip install async-dash
Usage
from dash import Dash, html, dcc, Output, Input
Motivation
In addition to all the advantages of writing async code, async-dash
enables you to:
- run truly asynchronous callbacks
- use websockets, server sent events, etc. without needing to monkey patch the Python standard library
- use
quart
/fastapi
/starlette
frameworks with your dash apps side by side - use HTTP/2 (especially server push) if you use it HTTP/2 enabled server such
as
hypercorn
.
Caveats
I'm maintaining this library as a proof of concept for now. It should not be used for production. You can see the
deviation from dash
here.
If you do decide to use it, I'd love to hear your feedback.
Alternatives
dash-devices
dash-devices
is another async port based on quart
. It's capable of using websockets even for callbacks, which makes
it way faster than either of dash
or async-dash
. However, the library stands outdated at the time this document was
last updated.
PS: async-dash
is highly inspired by the dash-devices
. Difference being that async-dash
tries to follow dash
as close as possible.
Known Issues
- Exception handling in callbacks in debug mode is broken.
TODO
- Write examples/articles showcasing the use cases for asynchronous
dash
. - Gather reviews and feedback from the Dash Community.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file async-dash-0.1.0a0.tar.gz
.
File metadata
- Download URL: async-dash-0.1.0a0.tar.gz
- Upload date:
- Size: 7.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fff30cfbcbc4c737aff5fa8b4d537a4a56eba5a3a29942b8bd661a5ae9e91381 |
|
MD5 | 1b6bf767d874351af65dc6d26f4b2300 |
|
BLAKE2b-256 | 00c6ac286494900d087d3db1ad8f37b6882328b9529992dff55c4c41d57431f0 |
File details
Details for the file async_dash-0.1.0a0-py3-none-any.whl
.
File metadata
- Download URL: async_dash-0.1.0a0-py3-none-any.whl
- Upload date:
- Size: 7.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf6af782fea64f806d501f123f6546cb394f474bfcdc23eed899b30474fb9055 |
|
MD5 | 26e1e9591e8c0ff9c5b193fa92f7eaf7 |
|
BLAKE2b-256 | baab184d24017d270dc54eeaeb42ebcf7e36d6d16ea8fde6c23b71eb65f65b86 |