Skip to main content

exec

Execution application for running code in Datalayer runtimes.

class RuntimesExecService(token: 'Optional[str]' = None) -> 'None'

Service for executing files on Datalayer runtimes.

__init__(token: 'Optional[str]' = None) -> 'None'

Initialize the exec service.

handle_sigint(*args: 'Any') -> 'None'

Handle SIGINT signal during kernel execution.

init_kernel_manager(runtime_name: 'str') -> 'None'

Initialize the kernel manager and connect to runtime.

execute_file(filepath: 'Path', silent: 'bool' = True, timeout: 'Optional[float]' = None, raise_exceptions: 'bool' = False) -> 'None'

Execute a file or notebook on the connected runtime.

Parameters

  • filepath : Path

    Path to the file to execute.

  • silent : bool

    Whether to suppress cell output.

  • timeout : Optional[float]

    Execution timeout for each cell.

  • raise_exceptions : bool

    Whether to stop on exceptions.

cleanup() -> 'None'

Clean up resources.

def main(filename: 'str' = <typer.models.ArgumentInfo object at 0x7fe8e3631310>, runtime: 'Optional[str]' = <typer.models.OptionInfo object at 0x7fe8e3631450>, verbose: 'bool' = <typer.models.OptionInfo object at 0x7fe8e36316d0>, timeout: 'Optional[float]' = <typer.models.OptionInfo object at 0x7fe8e3631810>, raise_exceptions: 'bool' = <typer.models.OptionInfo object at 0x7fe8e3631950>, token: 'Optional[str]' = <typer.models.OptionInfo object at 0x7fe8e3631a90>) -> 'None'

Execute a Python file or Jupyter notebook on a Datalayer runtime.