package jupyter-kernel

  1. Overview
  2. Docs
type stream = Protocol_t.stream = {
  1. st_name : string;
  2. st_data : string;
}
type status = Protocol_t.status = {
  1. execution_state : string;
}
type shutdown = Protocol_t.shutdown = {
  1. restart : bool;
}
type dyn = Yojson.Safe.t
type pyout = Protocol_t.pyout = {
  1. po_execution_count : int;
  2. po_data : dyn;
  3. po_metadata : dyn;
}
type pyin = Protocol_t.pyin = {
  1. pi_code : string;
  2. pi_execution_count : int;
}
type payload = Protocol_t.payload = {
  1. html : string;
  2. source : string;
  3. start_line_number : int;
  4. text : string;
}
type language_info = Protocol_t.language_info = {
  1. li_name : string;
  2. li_version : string;
  3. li_mimetype : string;
  4. li_file_extension : string;
  5. li_codemirror_mode : string option;
}
type kernel_info_reply = Protocol_t.kernel_info_reply = {
  1. protocol_version : string;
  2. implementation : string;
  3. implementation_version : string;
  4. language_info : language_info;
  5. banner : string;
}
type is_complete_request = Protocol_t.is_complete_request = {
  1. icr_code : string;
}
type is_complete_reply = Protocol_t.is_complete_reply = {
  1. icr_status : string;
  2. icr_indent : string;
}
type interrupt_reply = Protocol_t.interrupt_reply = {
  1. status : string;
}
type inspect_request = Protocol_t.inspect_request = {
  1. ir_code : string;
  2. ir_cursor_pos : int;
  3. ir_detail_level : int;
}
type inspect_reply = Protocol_t.inspect_reply = {
  1. ir_status : string;
  2. ir_found : bool option;
  3. ir_data : dyn option;
  4. ir_metadata : dyn option;
  5. ir_ename : string option;
  6. ir_evalue : string option;
  7. ir_traceback : string list option;
}
type history_request = Protocol_t.history_request = {
  1. output : bool;
  2. raw : bool;
  3. hist_access_type : string;
  4. hr_session : int;
  5. start : int;
  6. stop : int;
  7. n : int;
  8. pattern : string;
  9. unique : bool;
}
type history_reply = Protocol_t.history_reply = {
  1. history : string list;
}
type header_info = Protocol_t.header_info = {
  1. date : string;
  2. version : string;
  3. username : string option;
  4. session : string option;
  5. msg_id : string;
  6. msg_type : string;
}
type execute_request = Protocol_t.execute_request = {
  1. code : string;
  2. silent : bool;
  3. store_history : bool;
  4. user_expressions : dyn;
  5. allow_stdin : bool;
}
type execute_reply = Protocol_t.execute_reply = {
  1. status : string;
  2. execution_count : int;
  3. ename : string option;
  4. evalue : string option;
  5. traceback : string list option;
  6. payload : payload list option;
  7. er_user_expressions : dyn option;
}
type execute_error = Protocol_t.execute_error = {
  1. err_ename : string;
  2. err_evalue : string;
  3. err_traceback : string list;
}
type display_data = Protocol_t.display_data = {
  1. dd_data : dyn;
  2. dd_metadata : dyn;
  3. dd_transient : dyn option;
}
type connection_info = Protocol_t.connection_info = {
  1. stdin_port : int;
  2. ip : string;
  3. control_port : int;
  4. hb_port : int;
  5. signature_scheme : string;
  6. key : string;
  7. shell_port : int;
  8. transport : string;
  9. iopub_port : int;
}
type connect_reply = Protocol_t.connect_reply = {
  1. cr_shell_port : int;
  2. cr_iopub_port : int;
  3. cr_stdin_port : int;
  4. cr_hb_port : int;
}
type complete_request = Protocol_t.complete_request = {
  1. line : string;
  2. cursor_pos : int;
}
type complete_reply = Protocol_t.complete_reply = {
  1. matches : string list;
  2. cursor_start : int;
  3. cursor_end : int;
  4. cr_status : string;
}
type comm_info_request = Protocol_t.comm_info_request = {
  1. target_name : string;
}
type clear_output = Protocol_t.clear_output = {
  1. wait : bool;
  2. stdout : bool;
  3. stderr : bool;
  4. other : bool;
}
val write_stream : Stdlib.Buffer.t -> stream -> unit

Output a JSON value of type stream.

val string_of_stream : ?len:int -> stream -> string

Serialize a value of type stream into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_stream : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> stream

Input JSON data of type stream.

val stream_of_string : string -> stream

Deserialize JSON data of type stream.

val write_status : Stdlib.Buffer.t -> status -> unit

Output a JSON value of type status.

val string_of_status : ?len:int -> status -> string

Serialize a value of type status into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_status : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> status

Input JSON data of type status.

val status_of_string : string -> status

Deserialize JSON data of type status.

val write_shutdown : Stdlib.Buffer.t -> shutdown -> unit

Output a JSON value of type shutdown.

val string_of_shutdown : ?len:int -> shutdown -> string

Serialize a value of type shutdown into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_shutdown : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> shutdown

Input JSON data of type shutdown.

val shutdown_of_string : string -> shutdown

Deserialize JSON data of type shutdown.

val write_dyn : Stdlib.Buffer.t -> dyn -> unit

Output a JSON value of type dyn.

val string_of_dyn : ?len:int -> dyn -> string

Serialize a value of type dyn into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_dyn : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> dyn

Input JSON data of type dyn.

val dyn_of_string : string -> dyn

Deserialize JSON data of type dyn.

val write_pyout : Stdlib.Buffer.t -> pyout -> unit

Output a JSON value of type pyout.

val string_of_pyout : ?len:int -> pyout -> string

Serialize a value of type pyout into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_pyout : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> pyout

Input JSON data of type pyout.

val pyout_of_string : string -> pyout

Deserialize JSON data of type pyout.

val write_pyin : Stdlib.Buffer.t -> pyin -> unit

Output a JSON value of type pyin.

val string_of_pyin : ?len:int -> pyin -> string

Serialize a value of type pyin into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_pyin : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> pyin

Input JSON data of type pyin.

val pyin_of_string : string -> pyin

Deserialize JSON data of type pyin.

val write_payload : Stdlib.Buffer.t -> payload -> unit

Output a JSON value of type payload.

val string_of_payload : ?len:int -> payload -> string

Serialize a value of type payload into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_payload : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> payload

Input JSON data of type payload.

val payload_of_string : string -> payload

Deserialize JSON data of type payload.

val write_language_info : Stdlib.Buffer.t -> language_info -> unit

Output a JSON value of type language_info.

val string_of_language_info : ?len:int -> language_info -> string

Serialize a value of type language_info into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_language_info : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> language_info

Input JSON data of type language_info.

val language_info_of_string : string -> language_info

Deserialize JSON data of type language_info.

Output a JSON value of type help_link.

Serialize a value of type help_link into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type help_link.

Deserialize JSON data of type help_link.

val write_kernel_info_reply : Stdlib.Buffer.t -> kernel_info_reply -> unit

Output a JSON value of type kernel_info_reply.

val string_of_kernel_info_reply : ?len:int -> kernel_info_reply -> string

Serialize a value of type kernel_info_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_kernel_info_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> kernel_info_reply

Input JSON data of type kernel_info_reply.

val kernel_info_reply_of_string : string -> kernel_info_reply

Deserialize JSON data of type kernel_info_reply.

val write_is_complete_request : Stdlib.Buffer.t -> is_complete_request -> unit

Output a JSON value of type is_complete_request.

val string_of_is_complete_request : ?len:int -> is_complete_request -> string

Serialize a value of type is_complete_request into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_is_complete_request : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> is_complete_request

Input JSON data of type is_complete_request.

val is_complete_request_of_string : string -> is_complete_request

Deserialize JSON data of type is_complete_request.

val write_is_complete_reply : Stdlib.Buffer.t -> is_complete_reply -> unit

Output a JSON value of type is_complete_reply.

val string_of_is_complete_reply : ?len:int -> is_complete_reply -> string

Serialize a value of type is_complete_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_is_complete_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> is_complete_reply

Input JSON data of type is_complete_reply.

val is_complete_reply_of_string : string -> is_complete_reply

Deserialize JSON data of type is_complete_reply.

val write_interrupt_reply : Stdlib.Buffer.t -> interrupt_reply -> unit

Output a JSON value of type interrupt_reply.

val string_of_interrupt_reply : ?len:int -> interrupt_reply -> string

Serialize a value of type interrupt_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_interrupt_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> interrupt_reply

Input JSON data of type interrupt_reply.

val interrupt_reply_of_string : string -> interrupt_reply

Deserialize JSON data of type interrupt_reply.

val write_inspect_request : Stdlib.Buffer.t -> inspect_request -> unit

Output a JSON value of type inspect_request.

val string_of_inspect_request : ?len:int -> inspect_request -> string

Serialize a value of type inspect_request into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_inspect_request : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> inspect_request

Input JSON data of type inspect_request.

val inspect_request_of_string : string -> inspect_request

Deserialize JSON data of type inspect_request.

val write_inspect_reply : Stdlib.Buffer.t -> inspect_reply -> unit

Output a JSON value of type inspect_reply.

val string_of_inspect_reply : ?len:int -> inspect_reply -> string

Serialize a value of type inspect_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_inspect_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> inspect_reply

Input JSON data of type inspect_reply.

val inspect_reply_of_string : string -> inspect_reply

Deserialize JSON data of type inspect_reply.

val write_history_request : Stdlib.Buffer.t -> history_request -> unit

Output a JSON value of type history_request.

val string_of_history_request : ?len:int -> history_request -> string

Serialize a value of type history_request into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_history_request : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> history_request

Input JSON data of type history_request.

val history_request_of_string : string -> history_request

Deserialize JSON data of type history_request.

val write_history_reply : Stdlib.Buffer.t -> history_reply -> unit

Output a JSON value of type history_reply.

val string_of_history_reply : ?len:int -> history_reply -> string

Serialize a value of type history_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_history_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> history_reply

Input JSON data of type history_reply.

val history_reply_of_string : string -> history_reply

Deserialize JSON data of type history_reply.

val write_header_info : Stdlib.Buffer.t -> header_info -> unit

Output a JSON value of type header_info.

val string_of_header_info : ?len:int -> header_info -> string

Serialize a value of type header_info into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_header_info : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> header_info

Input JSON data of type header_info.

val header_info_of_string : string -> header_info

Deserialize JSON data of type header_info.

val write_execute_request : Stdlib.Buffer.t -> execute_request -> unit

Output a JSON value of type execute_request.

val string_of_execute_request : ?len:int -> execute_request -> string

Serialize a value of type execute_request into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_execute_request : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> execute_request

Input JSON data of type execute_request.

val execute_request_of_string : string -> execute_request

Deserialize JSON data of type execute_request.

val write_execute_reply : Stdlib.Buffer.t -> execute_reply -> unit

Output a JSON value of type execute_reply.

val string_of_execute_reply : ?len:int -> execute_reply -> string

Serialize a value of type execute_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_execute_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> execute_reply

Input JSON data of type execute_reply.

val execute_reply_of_string : string -> execute_reply

Deserialize JSON data of type execute_reply.

val write_execute_error : Stdlib.Buffer.t -> execute_error -> unit

Output a JSON value of type execute_error.

val string_of_execute_error : ?len:int -> execute_error -> string

Serialize a value of type execute_error into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_execute_error : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> execute_error

Input JSON data of type execute_error.

val execute_error_of_string : string -> execute_error

Deserialize JSON data of type execute_error.

val write_display_data : Stdlib.Buffer.t -> display_data -> unit

Output a JSON value of type display_data.

val string_of_display_data : ?len:int -> display_data -> string

Serialize a value of type display_data into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_display_data : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> display_data

Input JSON data of type display_data.

val display_data_of_string : string -> display_data

Deserialize JSON data of type display_data.

val write_connection_info : Stdlib.Buffer.t -> connection_info -> unit

Output a JSON value of type connection_info.

val string_of_connection_info : ?len:int -> connection_info -> string

Serialize a value of type connection_info into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_connection_info : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> connection_info

Input JSON data of type connection_info.

val connection_info_of_string : string -> connection_info

Deserialize JSON data of type connection_info.

val write_connect_reply : Stdlib.Buffer.t -> connect_reply -> unit

Output a JSON value of type connect_reply.

val string_of_connect_reply : ?len:int -> connect_reply -> string

Serialize a value of type connect_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_connect_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> connect_reply

Input JSON data of type connect_reply.

val connect_reply_of_string : string -> connect_reply

Deserialize JSON data of type connect_reply.

val write_complete_request : Stdlib.Buffer.t -> complete_request -> unit

Output a JSON value of type complete_request.

val string_of_complete_request : ?len:int -> complete_request -> string

Serialize a value of type complete_request into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_complete_request : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> complete_request

Input JSON data of type complete_request.

val complete_request_of_string : string -> complete_request

Deserialize JSON data of type complete_request.

val write_complete_reply : Stdlib.Buffer.t -> complete_reply -> unit

Output a JSON value of type complete_reply.

val string_of_complete_reply : ?len:int -> complete_reply -> string

Serialize a value of type complete_reply into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_complete_reply : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> complete_reply

Input JSON data of type complete_reply.

val complete_reply_of_string : string -> complete_reply

Deserialize JSON data of type complete_reply.

val write_comm_info_request : Stdlib.Buffer.t -> comm_info_request -> unit

Output a JSON value of type comm_info_request.

val string_of_comm_info_request : ?len:int -> comm_info_request -> string

Serialize a value of type comm_info_request into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_comm_info_request : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> comm_info_request

Input JSON data of type comm_info_request.

val comm_info_request_of_string : string -> comm_info_request

Deserialize JSON data of type comm_info_request.

val write_clear_output : Stdlib.Buffer.t -> clear_output -> unit

Output a JSON value of type clear_output.

val string_of_clear_output : ?len:int -> clear_output -> string

Serialize a value of type clear_output into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_clear_output : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> clear_output

Input JSON data of type clear_output.

val clear_output_of_string : string -> clear_output

Deserialize JSON data of type clear_output.