File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -785,7 +785,20 @@ def _setup_routes(self):
785
785
self ._add_url ("<path:path>" , self .index )
786
786
787
787
def setup_apis (self ):
788
- # Copy over global callback data structures assigned with `dash.callback`
788
+ """
789
+ Register API endpoints for all callbacks defined using `dash.callback`.
790
+
791
+ This method must be called after all callbacks are registered and before the app is served.
792
+ It ensures that all callback API routes are available for the Dash app to function correctly.
793
+
794
+ Typical usage:
795
+ app = Dash(__name__)
796
+ # Register callbacks here
797
+ app.setup_apis()
798
+ app.run()
799
+
800
+ If not called, callback endpoints will not be available and the app will not function as expected.
801
+ """
789
802
for k in list (_callback .GLOBAL_API_PATHS ):
790
803
if k in self .callback_api_paths :
791
804
raise DuplicateCallback (
You can’t perform that action at this time.
0 commit comments