Flash - async port of Dash with Quart

Hi Community!

I would like to share my Dash fork Flash, an async patch with Quart as backend for Dash. It supports all functions from the latest Dash version 2.18.2.

The current setup is fully integrated into Dash, which makes it possible to run Dash’s test suite. Most of the tests pass and can be track with the test-log . Some tests behave a little bit weird, I have a already opened a thread which covers this issue in more detail.
Base function that got changed can be seen in the patch-log.

Beside some strange behaviours everything functions as expected! Not a 100%:

  • Somehow I cant disable server logs
  • The dev tools ui works, but doesnt look exactly like the original

Overall caveates:

  • callback functions can be sync and async, sync functions get added to a separate executor
  • background callback functions have to be sync and also get added to a separate executor
  • dash_duo uses the multi process runner now, the threaded runner made problems with the eventloop

Contribution:

What would be the best way to make this available? I really enjoy the current setup with the testing suite by Dash but that clashes with other Dash libraries which require Dash. And publishing a patch library like dash-async could become tedious because quite a lot modules and functions had to be patched.

I am glad for any feedback and recommendations!

Happy coding :smiley:

So my current idea would be to have 2 repos, one for testing where I merge newest Dash versions, apply changes and run the Dash tests to ensure the base functionality.

The second repo is the one to install. The question would be then how the different modules should be imported - Looking for your opinion here!

Should only only the async patched modules be imported from flash and modules like the dependencies, which are not affected by changes, further from dash ?

from flash import Flash, register_page, ctx, callback, set_props
from dash import Input, Output, State, Patch

Or rather everything from flash, so you could just globally replace dash with flash and everything runs?

from flash import (
Flash, 
register_page, 
ctx, 
callback, 
set_props,
Input, 
Output,
State, 
Patch
)

Really looking forward to your feedback !

I’m going to try this out in the next week or two! Will let you know if I have any feedback.

On the import style – not a hard preference either way from me.

Nice looking forward to your feedback!
I’ve created a new thread with the latest updates, which fixed some problems mentioned in here 🚀 New Component: Flash v0.1.0b2 - Async Dash.
Lets continue there!