Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add startup route setup #2832

Merged
merged 10 commits into from Apr 19, 2024
Merged

Add startup route setup #2832

merged 10 commits into from Apr 19, 2024

Conversation

danton267
Copy link
Member

Add the ability for packages to add routes that will be set up at the end of Dash init.

example:

my-package.py

from dash import Dash

def my_route_f():
   return {} # serializable object

Dash.add_startup_route("my-package-route", my_route_f, ["POST"])

_dash_startup_route/my-package-route will be created at the app=Dash(), and can be then used by the package features

tests/integration/test_integration.py Outdated Show resolved Hide resolved
dash/dash.py Show resolved Hide resolved
@danton267 danton267 requested a review from T4rk1n April 18, 2024 13:42
Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@danton267 danton267 merged commit 93195fa into dev Apr 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants