Skip to main content

console.manager

Kernel manager for Datalayer runtimes.

RuntimeManager Objects

class RuntimeManager(KernelHttpManager)

Manages a single Runtime.

Parameters

datalayer_url : str The runtime URL. token : str Authentication token. username : str Username for the runtime. **kwargs : dict[str, Any] Additional keyword arguments.

__init__

def __init__(datalayer_url: str, token: str, username: str,
**kwargs: dict[str, Any])

Initialize the gateway Runtime manager.

Parameters

datalayer_url : str The runtime URL. token : str Authentication token. username : str Username for the runtime. **kwargs : dict[str, Any] Additional keyword arguments.

kernel_url

@property
def kernel_url() -> Optional[str]

Get the kernel URL.

Returns

Optional[str] The kernel URL if available, None otherwise.

start_kernel

def start_kernel(name: str = "",
path: Optional[str] = None,
timeout: float = REQUEST_TIMEOUT) -> Optional[dict[str, Any]]

Start a kernel on Datalayer cloud.

Parameters

name : str Runtime name. path : str [optional] API path from root to the cwd of the kernel. timeout : float Request timeout.

Returns

dict[str, Any] | None The kernel model.