A kernel message on the 'iopub' channel.

interface IIOPubMessage<T> {
    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: 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";
    };
    header: IHeader<T>;
    metadata: JSONObject;
    parent_header: IHeader<KernelMessage.MessageType> | Record<string, never>;
}

Type Parameters

Hierarchy (view full)

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: 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";
}

The content of the message.

Type declaration

  • wait: boolean

Type declaration

Type declaration

  • Optional target_name?: string

    The comm target name to filter returned comms

Type declaration

Type declaration

  • comm_id: string
  • data: JSONObject
  • Optional target_module?: string
  • target_name: string

Type declaration

  • code: string
  • cursor_pos: number

Type declaration

  • data: IMimeBundle
  • metadata: PartialJSONObject
  • Optional transient?: {
        display_id?: string;
    }
    • Optional display_id?: string

Type declaration

  • ename: string
  • evalue: string
  • traceback: string[]

Type declaration

Type declaration

  • Optional allow_stdin?: boolean

    Whether to allow stdin requests. The default is true.

  • code: string

    The code to execute.

  • Optional silent?: boolean

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

  • Optional stop_on_error?: boolean

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

  • Optional store_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.

  • Optional user_expressions?: JSONObject

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

Type declaration

  • data: IMimeBundle
  • execution_count: ExecutionCount
  • metadata: PartialJSONObject
  • Optional transient?: {
        display_id?: string;
    }
    • Optional display_id?: string

Type declaration

  • 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.

Type declaration

  • code: string
  • cursor_pos: number
  • detail_level: 0 | 1

Type declaration

  • code: string

Type declaration

Type declaration

  • name: "stdout" | "stderr"
  • text: string

Type declaration

  • Optional arguments?: any
  • command: string
  • seq: number
  • type: "request"

Type declaration

  • Optional body?: any
  • command: string
  • Optional message?: string
  • request_seq: number
  • seq: number
  • success: boolean
  • type: "response"

Type declaration

  • Optional body?: any
  • event: string
  • seq: number
  • type: "event"
header: IHeader<T>

The message header.

metadata: JSONObject

Metadata associated with the message.

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

The parent message