MCPcopy
hub / github.com/plotly/dash / run

Method run

dash/dash.py:2285–2530  ·  view source on GitHub ↗

Start the flask server in local mode, you should not run this on a production server, use gunicorn/waitress instead. If a parameter can be set by an environment variable, that is listed too. Values provided here take precedence over environment variables. :param hos

(
        self,
        host: Optional[str] = None,
        port: Optional[Union[str, int]] = None,
        proxy: Optional[str] = None,
        debug: Optional[bool] = None,
        hide_all_callbacks: bool = False,
        jupyter_mode: Optional[JupyterDisplayMode] = None,
        jupyter_width: str = "100%",
        jupyter_height: int = 650,
        jupyter_server_url: Optional[str] = None,
        dev_tools_ui: Optional[bool] = None,
        dev_tools_props_check: Optional[bool] = None,
        dev_tools_serve_dev_bundles: Optional[bool] = None,
        dev_tools_hot_reload: Optional[bool] = None,
        dev_tools_hot_reload_interval: Optional[int] = None,
        dev_tools_hot_reload_watch_interval: Optional[int] = None,
        dev_tools_hot_reload_max_retry: Optional[int] = None,
        dev_tools_silence_routes_logging: Optional[bool] = None,
        dev_tools_disable_version_check: Optional[bool] = None,
        dev_tools_prune_errors: Optional[bool] = None,
        dev_tools_validate_callbacks: Optional[bool] = None,
        **flask_run_options,
    )

Source from the content-addressed store, hash-verified

2283
2284 # pylint: disable=too-many-branches
2285 def run(
2286 self,
2287 host: Optional[str] = None,
2288 port: Optional[Union[str, int]] = None,
2289 proxy: Optional[str] = None,
2290 debug: Optional[bool] = None,
2291 hide_all_callbacks: bool = False,
2292 jupyter_mode: Optional[JupyterDisplayMode] = None,
2293 jupyter_width: str = "100%",
2294 jupyter_height: int = 650,
2295 jupyter_server_url: Optional[str] = None,
2296 dev_tools_ui: Optional[bool] = None,
2297 dev_tools_props_check: Optional[bool] = None,
2298 dev_tools_serve_dev_bundles: Optional[bool] = None,
2299 dev_tools_hot_reload: Optional[bool] = None,
2300 dev_tools_hot_reload_interval: Optional[int] = None,
2301 dev_tools_hot_reload_watch_interval: Optional[int] = None,
2302 dev_tools_hot_reload_max_retry: Optional[int] = None,
2303 dev_tools_silence_routes_logging: Optional[bool] = None,
2304 dev_tools_disable_version_check: Optional[bool] = None,
2305 dev_tools_prune_errors: Optional[bool] = None,
2306 dev_tools_validate_callbacks: Optional[bool] = None,
2307 **flask_run_options,
2308 ):
2309 """Start the flask server in local mode, you should not run this on a
2310 production server, use gunicorn/waitress instead.
2311
2312 If a parameter can be set by an environment variable, that is listed
2313 too. Values provided here take precedence over environment variables.
2314
2315 :param host: Host IP used to serve the application, default to "127.0.0.1"
2316 env: ``HOST``
2317 :type host: string
2318
2319 :param port: Port used to serve the application, default to "8050"
2320 env: ``PORT``
2321 :type port: int
2322
2323 :param proxy: If this application will be served to a different URL
2324 via a proxy configured outside of Python, you can list it here
2325 as a string of the form ``"{input}::{output}"``, for example:
2326 ``"http://0.0.0.0:8050::https://my.domain.com"``
2327 so that the startup message will display an accurate URL.
2328 env: ``DASH_PROXY``
2329 :type proxy: string
2330
2331 :param debug: Set Flask debug mode and enable dev tools.
2332 env: ``DASH_DEBUG``
2333 :type debug: bool
2334
2335 :param debug: Enable/disable all the dev tools unless overridden by the
2336 arguments or environment variables. Default is ``True`` when
2337 ``enable_dev_tools`` is called directly, and ``False`` when called
2338 via ``run``. env: ``DASH_DEBUG``
2339 :type debug: bool
2340
2341 :param hide_all_callbacks: Default ``False``: Sets the default value of
2342 ``hidden`` for all callbacks added to the app. Normally all callbacks

Callers 15

test_port_env_fail_strFunction · 0.95
test_port_env_fail_rangeFunction · 0.95
test_no_proxy_successFunction · 0.95
test_proxy_successFunction · 0.95
test_proxy_failureFunction · 0.95
test_debug_mode_runFunction · 0.95
rerun_failed_testsFunction · 0.45
wrapFunction · 0.45
set_propsFunction · 0.45
app3.pyFile · 0.45

Calls 7

enable_dev_toolsMethod · 0.95
get_combined_configFunction · 0.85
walkMethod · 0.80
run_appMethod · 0.80
updateMethod · 0.45
getMethod · 0.45
appendMethod · 0.45

Tested by 7

test_port_env_fail_strFunction · 0.76
test_port_env_fail_rangeFunction · 0.76
test_no_proxy_successFunction · 0.76
test_proxy_successFunction · 0.76
test_proxy_failureFunction · 0.76
test_debug_mode_runFunction · 0.76
rerun_failed_testsFunction · 0.36