Datalayer VS Code Extension - v0.0.17
    Preparing search index...

    Inline Pyodide kernel that creates Web Worker from Blob URL.

    Implements

    • IKernelConnection
    Index

    Constructors

    Properties

    clientId: string

    The client unique id.

    This should be unique for a particular kernel connection object.

    handleComms: boolean = true

    Whether the kernel connection handles comm messages.

    The comm message protocol currently has implicit assumptions that only one kernel connection is handling comm messages. This option allows a kernel connection to opt out of handling comms.

    See https://github.com/jupyter/jupyter_client/issues/263

    id: string

    The id of the server-side kernel.

    model: IModel

    The kernel model, for convenience.

    name: string

    The name of the server-side kernel.

    serverSettings: ISettings

    The server settings for the kernel.

    subshellId: string = null

    The subshell ID, main shell has null.

    username: string = ""

    The client username.

    Accessors

    • get anyMessage(): ISignal<this, any>

      Signal emitted for any sent or received message.

      Returns ISignal<this, any>

    • get connectionStatus(): ConnectionStatus

      Current connection status of the worker.

      Returns ConnectionStatus

    • get connectionStatusChanged(): ISignal<this, ConnectionStatus>

      Signal emitted when connection status changes.

      Returns ISignal<this, ConnectionStatus>

    • get iopubMessage(): ISignal<this, any>

      Signal emitted for IOPub channel messages.

      Returns ISignal<this, any>

    • get pendingInput(): ISignal<this, boolean>

      Signal emitted when pending input state changes.

      Returns ISignal<this, boolean>

    • get statusChanged(): ISignal<this, Status>

      Signal emitted when kernel status changes.

      Returns ISignal<this, Status>

    • get unhandledMessage(): ISignal<this, IMessage<MessageType>>

      Signal emitted for unhandled kernel messages.

      Returns ISignal<this, IMessage<MessageType>>

    Methods

    • Clone the kernel connection (not supported for Pyodide).

      Parameters

      • Optional_options: any

        Clone options (unused).

      Returns IKernelConnection

      Never returns, always throws.

      Always throws because Pyodide kernels do not support cloning.

    • Create a comm (not supported for Pyodide).

      Parameters

      • _targetName: string

        Comm target name (unused).

      • Optional_commId: string

        Optional comm ID (unused).

      Returns any

      Always throws because Pyodide does not support comms.

    • Check if a comm exists (always false for Pyodide).

      Parameters

      • _commId: string

        Comm ID to check (unused).

      Returns boolean

      Always false.

    • Interrupt execution (not supported, web workers cannot be interrupted).

      Returns Promise<void>

    • Register a comm target (no-op for Pyodide).

      Parameters

      • _targetName: string

        Comm target name (unused).

      • _callback: (comm: any, msg: any) => void | PromiseLike<void>

        Handler for comm open messages (unused).

      Returns void

    • Register a message hook (no-op for Pyodide).

      Parameters

      • _msgId: string

        Message ID to hook (unused).

      • _hook: (msg: any) => boolean | PromiseLike<boolean>

        Hook function (unused).

      Returns void

    • Remove a comm target (no-op for Pyodide).

      Parameters

      • _targetName: string

        Comm target name (unused).

      • _callback: (comm: any, msg: any) => void | PromiseLike<void>

        Handler to remove (unused).

      Returns void

    • Remove a message hook (no-op for Pyodide).

      Parameters

      • _msgId: string

        Message ID to unhook (unused).

      • _hook: (msg: any) => boolean | PromiseLike<boolean>

        Hook function to remove (unused).

      Returns void

    • Request comm info (returns empty for Pyodide).

      Parameters

      • _content: any

        Comm info request content (unused).

      Returns Promise<any>

      Promise resolving to empty comms.

    • Request code completion suggestions.

      Parameters

      • content: any

        Completion request with cursor position.

      Returns Promise<any>

      Promise resolving to completion matches.

    • Request subshell creation (not supported for Pyodide).

      Parameters

      • _content: Record<string, unknown>

        Subshell creation request (unused).

      • Optional_disposeOnDone: boolean

        Whether to dispose after done (unused).

      Returns any

      Always throws because Pyodide does not support subshells.

    • Request debugging (not supported for Pyodide).

      Parameters

      • _content: {}

        Debug request content (unused).

      • Optional_disposeOnDone: boolean

        Whether to dispose after done (unused).

      Returns any

      Always throws because Pyodide does not support debugging.

    • Request subshell deletion (not supported for Pyodide).

      Parameters

      • _content: {}

        Subshell deletion request (unused).

      • Optional_disposeOnDone: boolean

        Whether to dispose after done (unused).

      Returns any

      Always throws because Pyodide does not support subshells.

    • Execute code in the Pyodide kernel via worker.

      Parameters

      • content: any

        Execution request with code string.

      • Optional_disposeOnDone: boolean

        Whether to dispose future after completion (unused).

      • Optional_metadata: any

        Optional metadata for the request (unused).

      Returns any

      Kernel future tracking execution progress.

    • Request command history (returns empty for Pyodide).

      Parameters

      • _content: any

        History request content (unused).

      Returns Promise<any>

      Promise resolving to empty history.

    • Request object inspection (not supported for Pyodide).

      Parameters

      • _content: any

        Inspection request content (unused).

      Returns Promise<any>

      Promise resolving to empty inspection result.

    • Check if code is complete (always returns complete for Pyodide).

      Parameters

      • _content: any

        Is-complete request content (unused).

      Returns Promise<any>

      Promise resolving to complete status.

    • Request kernel info metadata.

      Returns Promise<any>

      Promise resolving to kernel info reply.

    • Request subshell listing (not supported for Pyodide).

      Parameters

      • _content: Record<string, unknown>

        Subshell list request (unused).

      • Optional_disposeOnDone: boolean

        Whether to dispose after done (unused).

      Returns any

      Always throws because Pyodide does not support subshells.

    • Send control message (not supported for Pyodide).

      Type Parameters

      • T extends ControlMessageType

      Parameters

      • _msg: IControlMessage<T>

        Control message to send (unused).

      • Optional_expectReply: boolean

        Whether to expect a reply (unused).

      • Optional_disposeOnDone: boolean

        Whether to dispose after done (unused).

      Returns any

      Always throws because Pyodide does not support control messages.

    • Send input reply (no-op for Pyodide).

      Parameters

      • _content: any

        Input reply content (unused).

      Returns void

    • Send shell message (not supported for Pyodide).

      Parameters

      • _msg: any

        Shell message to send (unused).

      • Optional_expectReply: boolean

        Whether to expect a reply (unused).

      • Optional_disposeOnDone: boolean

        Whether to dispose after done (unused).

      Returns any

      Always throws because Pyodide does not support direct shell messaging.