Skip to main content

run_command

AsyncMethod
This is a method of the SandboxProtocol class in the protocols module.
Run a shell command in the sandbox.

Signature

async def run_command(command: Union[str, List[str]], limits: Optional[ResourceLimits], env: Optional[Dict[str, str]], working_dir: Optional[str]) -> SandboxResult

Parameters

command
Union
required
Command to run (string or list of args)
limits
Optional
Resource limits for execution
env
Optional
Environment variables
working_dir
Optional
Working directory

Returns

Returns
SandboxResult
Execution result