run.ShinyAppProc

run.ShinyAppProc(self, proc, port, *, app_file)

Class that represents a running Shiny app process.

This class is a context manager that can be used to run a Shiny app in a subprocess. It provides a way to interact with the app and terminate it when it is no longer needed.

Attributes

Name Description
file The path to the Shiny app file.
port The port that the Shiny app is running on.
proc The subprocess object that represents the running Shiny app.
stderr The standard error stream of the Shiny app subprocess.
stdout The standard output stream of the Shiny app subprocess.
url The URL that the Shiny app is running on.

Methods

Name Description
close Closes the connection and terminates the process.
wait_until_ready Waits until the shiny app is ready to serve requests.

close

run.ShinyAppProc.close()

Closes the connection and terminates the process.

This method is responsible for closing the connection and terminating the process associated with it.

wait_until_ready

run.ShinyAppProc.wait_until_ready(timeout_secs)

Waits until the shiny app is ready to serve requests.

Parameters

timeout_secs: float

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

Raises

Type Description
ConnectionError If there is an error while starting the shiny app.
TimeoutError If the shiny app does not become ready within the specified timeout.