package jupyter

  1. Overview
  2. Docs

Module Jupyter.MessageSource

Messaging in Jupyter

Headers

Sourcetype header = {
  1. msg_id : string;
    (*

    typically UUID, must be unique per message

    *)
  2. msg_type : string;
    (*

    the kind of message

    *)
  3. session : string;
    (*

    typically UUID, should be unique per session

    *)
  4. date : string option;
    (*

    ISO8601 timestamp for when the message is created

    *)
  5. username : string;
    (*

    the current username

    *)
  6. version : string;
    (*

    the message protocol version

    *)
}
Sourceval header_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> header
Sourceval yojson_of_header : header -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval header_of_string : string -> header
Sourceval header_option_of_string : string -> header Json.option_try
Sourceval string_of_header : header -> string
Sourceval string_of_header_option : header option -> string

Top-level message

Sourcetype 'content t = {
  1. zmq_ids : string list;
  2. content : 'content;
    (*

    The actual content of the message must be a dict, whose structure depends on the message type.

    *)
  3. header : header;
    (*

    The message header contains a pair of unique identifiers for the originating session and the actual message id, in addition to the username for the process that generated the message. This is useful in collaborative settings where multiple users may be interacting with the same kernel simultaneously, so that frontends can label the various messages in a meaningful way.

    *)
  4. parent_header : header option;
    (*

    In a chain of messages, the header from the parent is copied so that clients can track where messages come from.

    *)
  5. metadata : string;
    (*

    Any metadata associated with the message.

    *)
  6. buffers : string list;
    (*

    optional: buffers is a list of binary data buffers for implementations that support binary extensions to the protocol.

    *)
}
Sourceval t_of_yojson : 'content. (Ppx_yojson_conv_lib.Yojson.Safe.t -> 'content) -> Ppx_yojson_conv_lib.Yojson.Safe.t -> 'content t
Sourceval yojson_of_t : 'content. ('content -> Ppx_yojson_conv_lib.Yojson.Safe.t) -> 'content t -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval epoch_to_iso8601_string : float -> string
Sourceval create_next : ?time:float -> content_to_yojson:('a -> [> `List of [> `String of string ] list ]) -> 'b t -> 'a -> 'a t
Sourceval create_next_shell : ?time:float -> 'a t -> Shell.reply -> Shell.reply t
Sourceval create_next_iopub : ?time:float -> 'a t -> Iopub.reply -> Iopub.reply t
Sourceval create_next_stdin : ?time:float -> 'a t -> Stdin.reply -> Stdin.reply t

Messages

Sourcetype request =
  1. | SHELL_REQ of Shell.request t
  2. | STDIN_REQ of Stdin.request t
Sourceval request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> request
Sourceval yojson_of_request : request -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourcetype reply =
  1. | SHELL_REP of Shell.reply t
  2. | IOPUB_REP of Iopub.reply t
  3. | STDIN_REP of Stdin.reply t
Sourceval reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> reply
Sourceval yojson_of_reply : reply -> Ppx_yojson_conv_lib.Yojson.Safe.t
OCaml

Innovation. Community. Security.