processes.start_container

processes.start_container(
    module_name,
    ip,
    port,
    loglevel=10,
    modules_root_path=Path('.'),
    start_kwargs={},
)

Start a container for a given module.

This function creates a subprocess to run a specified module using the provided configurations. It supports starting Python modules and can be extended to support other types of containers in the future.

Parameters

Name Type Description Default
module_name str The name of the module to start. required
ip str The IP address on which the module should run. required
port int The port number on which the module should run. required
loglevel int The logging level for the module, by default 10 (DEBUG). 10
modules_root_path Path The root path where the modules are located, by default Path(“.”). Path('.')
start_kwargs dict Additional keyword arguments to pass to the module, by default {}. {}

Returns

Name Type Description
subprocess.Popen A Popen object representing the started subprocess.

Raises

Name Type Description
AssertionError If the specified module path does not exist.