A kernel message on the 'iopub' channel.

interface IIOPubMessage<T extends IOPubMessageType = IOPubMessageType> {
    buffers?: (ArrayBuffer | ArrayBufferView)[];
    channel: "iopub";
    content:
        | { wait: boolean }
        | { comm_id: string; data: JSONObject }
        | Record<string, never>
        | IReplyErrorContent
        | IReplyAbortContent
        | ICommInfoReply
        | { target_name?: string }
        | { comm_id: string; data: JSONObject }
        | {
            comm_id: string;
            data: JSONObject;
            target_module?: string;
            target_name: string;
        }
        | ICompleteReply
        | { code: string; cursor_pos: number }
        | {
            data: IMimeBundle;
            metadata: PartialJSONObject;
            transient?: { display_id?: string };
        }
        | { ename: string; evalue: string; traceback: string[] }
        | { code: string; execution_count: ExecutionCount }
        | IReplyErrorContent & IExecuteCount
        | IReplyAbortContent & IExecuteCount
        | IExecuteReply & IExecuteCount
        | {
            allow_stdin?: boolean;
            code: string;
            silent?: boolean;
            stop_on_error?: boolean;
            store_history?: boolean;
            user_expressions?: JSONObject;
        }
        | {
            data: IMimeBundle;
            execution_count: ExecutionCount;
            metadata: PartialJSONObject;
            transient?: { display_id?: string };
        }
        | IHistoryReply
        | IHistoryRequestRange
        | IHistoryRequestSearch
        | IHistoryRequestTail
        | KernelMessage.IInfoReply
        | IInputReply
        | { password: boolean; prompt: string }
        | IInspectReply
        | { code: string; cursor_pos: number; detail_level: 0 | 1 }
        | IIsCompleteReplyIncomplete
        | IIsCompleteReplyOther
        | { code: string }
        | { execution_state: Kernel.Status }
        | { name: "stdout" | "stderr"; text: string }
        | {
            data: IMimeBundle;
            metadata: PartialJSONObject;
            transient?: { display_id?: string };
        } & { transient: { display_id: string } }
        | { arguments?: any; command: string; seq: number; type: "request" }
        | {
            body?: any;
            command: string;
            message?: string;
            request_seq: number;
            seq: number;
            success: boolean;
            type: "response";
        }
        | { body?: any; event: string; seq: number; type: "event" }
        | Record<string, unknown>
        | { subshell_id: string }
        | { subshell_id: string }
        | { subshell_id: string[] };
    header: IHeader<T>;
    metadata: JSONObject;
    parent_header: IHeader<KernelMessage.MessageType> | Record<string, never>;
}

Type Parameters

Hierarchy (View Summary)

Properties

buffers?: (ArrayBuffer | ArrayBufferView)[]

An optional list of binary buffers.

channel: "iopub"

The channel on which the message is transmitted.

content:
    | { wait: boolean }
    | { comm_id: string; data: JSONObject }
    | Record<string, never>
    | IReplyErrorContent
    | IReplyAbortContent
    | ICommInfoReply
    | { target_name?: string }
    | { comm_id: string; data: JSONObject }
    | {
        comm_id: string;
        data: JSONObject;
        target_module?: string;
        target_name: string;
    }
    | ICompleteReply
    | { code: string; cursor_pos: number }
    | {
        data: IMimeBundle;
        metadata: PartialJSONObject;
        transient?: { display_id?: string };
    }
    | { ename: string; evalue: string; traceback: string[] }
    | { code: string; execution_count: ExecutionCount }
    | IReplyErrorContent & IExecuteCount
    | IReplyAbortContent & IExecuteCount
    | IExecuteReply & IExecuteCount
    | {
        allow_stdin?: boolean;
        code: string;
        silent?: boolean;
        stop_on_error?: boolean;
        store_history?: boolean;
        user_expressions?: JSONObject;
    }
    | {
        data: IMimeBundle;
        execution_count: ExecutionCount;
        metadata: PartialJSONObject;
        transient?: { display_id?: string };
    }
    | IHistoryReply
    | IHistoryRequestRange
    | IHistoryRequestSearch
    | IHistoryRequestTail
    | KernelMessage.IInfoReply
    | IInputReply
    | { password: boolean; prompt: string }
    | IInspectReply
    | { code: string; cursor_pos: number; detail_level: 0 | 1 }
    | IIsCompleteReplyIncomplete
    | IIsCompleteReplyOther
    | { code: string }
    | { execution_state: Kernel.Status }
    | { name: "stdout" | "stderr"; text: string }
    | {
        data: IMimeBundle;
        metadata: PartialJSONObject;
        transient?: { display_id?: string };
    } & { transient: { display_id: string } }
    | { arguments?: any; command: string; seq: number; type: "request" }
    | {
        body?: any;
        command: string;
        message?: string;
        request_seq: number;
        seq: number;
        success: boolean;
        type: "response";
    }
    | { body?: any; event: string; seq: number; type: "event" }
    | Record<string, unknown>
    | { subshell_id: string }
    | { subshell_id: string }
    | { subshell_id: string[] }

The content of the message.

Type declaration

  • { wait: boolean }
  • { comm_id: string; data: JSONObject }
  • Record<string, never>
  • IReplyErrorContent
  • IReplyAbortContent
  • ICommInfoReply
  • { target_name?: string }
    • Optionaltarget_name?: string

      The comm target name to filter returned comms

  • { comm_id: string; data: JSONObject }
  • {
        comm_id: string;
        data: JSONObject;
        target_module?: string;
        target_name: string;
    }
  • ICompleteReply
  • { code: string; cursor_pos: number }
  • {
        data: IMimeBundle;
        metadata: PartialJSONObject;
        transient?: { display_id?: string };
    }
  • { ename: string; evalue: string; traceback: string[] }
  • { code: string; execution_count: ExecutionCount }
  • IReplyErrorContent & IExecuteCount
  • IReplyAbortContent & IExecuteCount
  • IExecuteReply & IExecuteCount
  • {
        allow_stdin?: boolean;
        code: string;
        silent?: boolean;
        stop_on_error?: boolean;
        store_history?: boolean;
        user_expressions?: JSONObject;
    }
    • Optionalallow_stdin?: boolean

      Whether to allow stdin requests. The default is true.

    • code: string

      The code to execute.

    • Optionalsilent?: boolean

      Whether to execute the code as quietly as possible. The default is false.

    • Optionalstop_on_error?: boolean

      Whether to the abort execution queue on an error. The default is false.

    • Optionalstore_history?: boolean

      Whether to store history of the execution. The default true if silent is False. It is forced to false if silent is true.

    • Optionaluser_expressions?: JSONObject

      A mapping of names to expressions to be evaluated in the kernel's interactive namespace.

  • {
        data: IMimeBundle;
        execution_count: ExecutionCount;
        metadata: PartialJSONObject;
        transient?: { display_id?: string };
    }
  • IHistoryReply
  • IHistoryRequestRange
  • IHistoryRequestSearch
  • IHistoryRequestTail
  • KernelMessage.IInfoReply
  • IInputReply
  • { password: boolean; prompt: string }
    • password: boolean

      Whether the request is for a password. If so, the frontend shouldn't echo input.

    • prompt: string

      The text to show at the prompt.

  • IInspectReply
  • { code: string; cursor_pos: number; detail_level: 0 | 1 }
  • IIsCompleteReplyIncomplete
  • IIsCompleteReplyOther
  • { code: string }
  • { execution_state: Kernel.Status }
  • { name: "stdout" | "stderr"; text: string }
  • {
        data: IMimeBundle;
        metadata: PartialJSONObject;
        transient?: { display_id?: string };
    } & { transient: { display_id: string } }
  • { arguments?: any; command: string; seq: number; type: "request" }
  • {
        body?: any;
        command: string;
        message?: string;
        request_seq: number;
        seq: number;
        success: boolean;
        type: "response";
    }
  • { body?: any; event: string; seq: number; type: "event" }
  • Record<string, unknown>
  • { subshell_id: string }
  • { subshell_id: string }
  • { subshell_id: string[] }
header: IHeader<T>

The message header.

metadata: JSONObject

Metadata associated with the message.

parent_header: IHeader<KernelMessage.MessageType> | Record<string, never>

The parent message