🚀 New Component: Flash v0.1.0b2 - Async Dash

Exmaples of websocket component & gathering promises

Hi Community!
After some back and forth, I can confidently share my Flash package. It is now in version v0.1.0b2 and includes all known Dash(v2.18.2) functions.

The repo builds directly on Dash and has a distinct package for publishing. This approach makes it possible to run Dash’s tests see test-logs. For the most part, tests that not pass either contain a process lock or global variable. More details regarding testing can be seen in this thread

That said, I didn’t encounter any bugs or issues yet, but haven’t test it in a proper production environment. I will keep you postet as soon as i deployed it in a K8s cluster! :slight_smile:

Dash Flash advantages:

  • Ensuring I/O bound tasks don’t block each other
  • Better state management via the URL due to async layout functions
  • Native websocket and HTTP/2 support

Possible future improvements:

  • websocket_callbacks broadcasting results to all clients subscripted to that callback
  • parallel routing

For further details and everything you need to start - have a look at the README

pip install dash-flash

Happy coding :pray:

4 Likes

Pretty cool, I like it.

Currently, I am running two servers, one being FastAPI with async functionality.
With your Flash I could likely consolidate everything, making things a bit easier.

  • websocket_callbacks broadcasting results to all clients subscripted to that callback

If I get time the next weeks, I will try it out :smiley:

Yes, definitely! Just missing the type validation. But also something to consider for the future - secure_callbacks that also check pydantic types.

Looking forward to your feedback!

@Datenschubse this looks fantastic - hope you continue the development on it. Curious - is the plotting in the demo video the Apex Charts wrapper or something else?

Hi @matthewcampbell - its planned for sure! haha
The chart is from the great dash-mantine-components chart package which is a wrapper around Recharts!

Release Candidate dash-flash 0.1.2rc2

Hey community!

Flash is now released as RC and covers all latest Dash 3.0 changes!
In addition to that, the first component optimised for Flash’s async nature is Flash-Router for dynamic and parallel routing. A post to that is coming as soon I have a proper route tree validation and tests in place.

FlashMessenger for native realtime streaming with Websockets and SSE’s is also already in planning!

3 Likes