Skip to content

Conversation

BSd3v
Copy link
Contributor

@BSd3v BSd3v commented Sep 9, 2025

This is an open PR draft, to contribute please target my forked branch.

The goal of this PR is to modularize the Dash setup to be independent of Flask (will fallback to Flask) and allow devs to configure their own backend.

  • decouple callback context from Flask Request
  • decouple index, assets, etc from build
  • build Quart server support
  • build FastAPI server support
  • allow for custom server build
  • add tests for servers

fixes #1571

@gvwilson gvwilson added feature something new P2 considered for next cycle community community contribution labels Sep 10, 2025
BSd3v and others added 25 commits September 13, 2025 00:20
…e flow. Made endpoints for downloading the reqs
* ∙ - remove contextvar from flask and quart only FastApi now relies on that
∙ - backend __init__ now holds the global request adapter and backend which get set on app initialisation
∙ request adapter and server can now be call from everywhere after the app initialised
∙ - added normal top level imports because the modules get matching loaded - but bad Import Error message when quart or equivilent are not installed
∙ - added _ as prefix to backends to avoid importing errors with their underlying
∙ - Can now move to remove unnecessary passing of the server object
∙

* Moved get_server_type to backends

* ∙ moved async validation to validation
∙ replaced request.get_path with request.path
∙

* Moved custom backend check to _validation.py

* Removed server injection of server methods - they use self.server now

* removed use_async from dispatch server methods and use dash_app._use_async
removed remaining set request process from flask

* adding custom error handling per backend, tests and adjustments to the flow. Made endpoints for downloading the reqs

* adjusments for formatting

* adjustment to retest backend

* Added Dash app as type to servers

* adding missing reqs association

* Addedd basic typing to servers

* fixing minor linting issues

* Fixed weird AI shit

* Cleanup before heavy pull

* Merged latest changes

* f rebase

* f rebase

* Added Dash app as type to servers

* Addedd basic typing to servers

---------

Co-authored-by: Christian Giessel <[email protected]>
Co-authored-by: BSd3v <[email protected]>
@BSd3v BSd3v marked this pull request as ready for review September 18, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new P2 considered for next cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide support for FastAPI / other ASGI
3 participants