Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Building support for decoupling Dash from Flask and supporting Quart / FastAPI servers#3430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
BSd3v wants to merge84 commits intoplotly:dev
base:dev
Choose a base branch
Loading
fromBSd3v:bring-your-own-server

Conversation

@BSd3v
Copy link
Contributor

@BSd3vBSd3v commentedSep 9, 2025
edited
Loading

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

CNFeffery, craftsman-vlad, insistence, Aaron-Wrote-This, HowRuck, pip-install-python, and GhaziXX reacted with thumbs up emoji
@gvwilsongvwilson added featuresomething new P2considered for next cycle communitycommunity contribution labelsSep 10, 2025
BSd3vand others added19 commitsSeptember 10, 2025 10:04
work to modularize the dash eco-system and decouple from Flask
∙ - added types to BaseFactory to remove linting errors on create app in Flask and Quart Factory
BSd3vand others added19 commitsSeptember 14, 2025 17:11
…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_asyncremoved 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 <cgiessel@tesla.com>Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
@BSd3vBSd3v marked this pull request as ready for reviewSeptember 18, 2025 20:34
BSd3vand others added6 commitsSeptember 22, 2025 08:30
* ∙ Added has_request_context to base_server∙ removed flask specific import in _validate and use backends.backend.has_request_context now* ∙ added context to request adapter∙ callback context uses request adapter context now∙* added get_root_path to dash _utilsremoved flask.helpers.get_root_path usage* moved compress to server implementationsflask fully decoupled from dash* fixed compress in quart and fastapi* Fixed server.config in fastapi to use config file* Update dash/backends/_fastapi.pyCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* removed unused flask import in pages* Update dash/backends/_quart.pyCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* removed flask specific return type to remove global dependency---------Co-authored-by: Christian Giessel <cgiessel@tesla.com>Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@T4rk1nT4rk1nAwaiting requested review from T4rk1nT4rk1n is a code owner

@ndreznndreznAwaiting requested review from ndreznndrezn is a code owner

@gvwilsongvwilsonAwaiting requested review from gvwilson

@emilyklemilyklAwaiting requested review from emilyklemilykl is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

@BSd3vBSd3v

Labels

communitycommunity contributionfeaturesomething newP2considered for next cycle

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

provide support for FastAPI / other ASGI

3 participants

@BSd3v@gvwilson@chgiesse

[8]ページ先頭

©2009-2025 Movatter.jp