run.run_shiny_app

run.run_shiny_app(app_file, *, start_attempts=3, port=0, cwd=None, wait_for_start=True, timeout_secs=30, bufsize=64 * 1024)

Run a Shiny app in a subprocess.

Parameters

app_file: Union[str, PurePath]

The path to the Shiny app file.

start_attempts: int = 3

Number of attempts to try and start the Shiny app. If the random port is already in use, a new random port will be chosen and another attempt will be made. If all attempts have been made, an error will be raised.

port: int = 0

The port to run the app on. If 0, a random port will be chosen.

cwd: Optional[str] = None

The working directory to run the app in.

wait_for_start: bool = True

If True, wait for the app to become ready before returning.

timeout_secs: float = 30

The maximum number of seconds to wait for the app to become ready.

bufsize: int = 64 * 1024

The buffer size to use for stdout and stderr.

Returns

Type Description
ShinyAppProc A shiny.run.ShinyAppProc object representing the running Shiny app process.