modal.container_process

modal.container_process.ContainerProcess

class ContainerProcess(object)
def __init__(self, process_id: str, client: _Client) -> None:

stdout

@property
def stdout(self) -> _StreamReader:

StreamReader for the container process’s stdout stream.

stderr

@property
def stderr(self) -> _StreamReader:

StreamReader for the container process’s stderr stream.

stdin

@property
def stdin(self) -> _StreamWriter:

StreamWriter for the container process’s stdin stream.

returncode

@property
def returncode(self) -> _StreamWriter:

poll

def poll(self) -> Optional[int]:

Check if the container process has finished running.

Returns None if the process is still running, else returns the exit code.

wait

def wait(self) -> int:

Wait for the container process to finish running. Returns the exit code.

attach

def attach(self, *, pty: bool):