package jupyter

  1. Overview
  2. Docs

Contents on SHELL channels

type status =
  1. | SHELL_OK
  2. | SHELL_ERROR
  3. | SHELL_ABORT
val status_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> status
val yojson_of_status : status -> Ppx_yojson_conv_lib.Yojson.Safe.t

Execution requests and replies

type exec_request = {
  1. exec_code : string;
  2. exec_silent : bool;
  3. exec_store_history : bool;
  4. exec_user_expr : Json.t;
  5. exec_allow_stdin : bool;
  6. exec_stop_on_error : bool;
}
val exec_request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> exec_request
val yojson_of_exec_request : exec_request -> Ppx_yojson_conv_lib.Yojson.Safe.t
type exec_reply = {
  1. exec_count : int;
  2. exec_status : status Json.enum;
}
val exec_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> exec_reply
val yojson_of_exec_reply : exec_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

Instrospection

type inspect_request = {
  1. insp_code : string;
  2. insp_pos : int;
  3. insp_detail : int;
}
val inspect_request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> inspect_request
val yojson_of_inspect_request : inspect_request -> Ppx_yojson_conv_lib.Yojson.Safe.t
type inspect_reply = {
  1. insp_status : status Json.enum;
  2. insp_found : bool;
  3. insp_data : Json.t;
  4. insp_metadata : Json.t;
}
val inspect_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> inspect_reply
val yojson_of_inspect_reply : inspect_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

Completion

type complete_request = {
  1. cmpl_code : string;
  2. cmpl_pos : int;
}
val complete_request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> complete_request
val yojson_of_complete_request : complete_request -> Ppx_yojson_conv_lib.Yojson.Safe.t
type complete_reply = {
  1. cmpl_matches : string list;
  2. cmpl_start : int;
  3. cmpl_end : int;
  4. cmpl_metadata : Json.t;
  5. cmpl_status : status Json.enum;
}
val complete_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> complete_reply
val yojson_of_complete_reply : complete_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

History

type history_request = {
  1. hist_output : bool;
  2. hist_raw : bool;
  3. hist_access_type : string;
  4. hist_session : int option;
  5. hist_start : int option;
  6. hist_stop : int option;
  7. hist_n : int;
  8. hist_pattern : string option;
  9. hist_unique : bool;
}
val history_request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> history_request
val yojson_of_history_request : history_request -> Ppx_yojson_conv_lib.Yojson.Safe.t
type history_reply = {
  1. history : (int option * int * string) list;
}
val history_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> history_reply
val yojson_of_history_reply : history_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

Code completeness

type is_complete_request = {
  1. is_cmpl_code : string;
}
val is_complete_request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> is_complete_request
val yojson_of_is_complete_request : is_complete_request -> Ppx_yojson_conv_lib.Yojson.Safe.t
type is_complete_reply = {
  1. is_cmpl_status : string;
  2. is_cmpl_indent : string option;
}
val is_complete_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> is_complete_reply
val yojson_of_is_complete_reply : is_complete_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

Connect

type connect_reply = {
  1. conn_shell_port : int;
  2. conn_iopub_port : int;
  3. conn_stdin_port : int;
  4. conn_hb_port : int;
  5. conn_ctrl_port : int;
}
val connect_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> connect_reply
val yojson_of_connect_reply : connect_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

Comm info

type comm_info_request = {
  1. ci_target : string option;
}
val comm_info_request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> comm_info_request
val yojson_of_comm_info_request : comm_info_request -> Ppx_yojson_conv_lib.Yojson.Safe.t
type comm_info_reply = {
  1. ci_comms : Json.t;
}
val comm_info_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> comm_info_reply
val yojson_of_comm_info_reply : comm_info_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t

Kernel information

type language_info = {
  1. lang_name : string;
    (*

    language name

    *)
  2. lang_version : string;
    (*

    language version

    *)
  3. lang_mimetype : string;
    (*

    mimetype

    *)
  4. lang_file_ext : string;
    (*

    file extension

    *)
  5. lang_lexer : string option;
    (*

    pygments lexer

    *)
  6. lang_mode : Json.t;
    (*

    codemirror mode

    *)
  7. lang_exporter : string option;
}
val language_info_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> language_info
val yojson_of_language_info : language_info -> Ppx_yojson_conv_lib.Yojson.Safe.t
val language_info : language_info
type kernel_info_reply = {
  1. kernel_prot_ver : string;
    (*

    protocol version

    *)
  2. kernel_impl : string;
  3. kernel_impl_ver : string;
  4. kernel_banner : string;
  5. kernel_lang_info : language_info;
  6. kernel_lang : string;
}
val kernel_info_reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> kernel_info_reply
val yojson_of_kernel_info_reply : kernel_info_reply -> Ppx_yojson_conv_lib.Yojson.Safe.t
val kernel_info_reply : kernel_info_reply

Kernel shutdown

type shutdown = {
  1. shutdown_restart : bool;
}
val shutdown_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> shutdown
val yojson_of_shutdown : shutdown -> Ppx_yojson_conv_lib.Yojson.Safe.t

Request

type request =
  1. | SHELL_KERNEL_INFO_REQ
  2. | SHELL_EXEC_REQ of exec_request
  3. | SHELL_INSPECT_REQ of inspect_request
  4. | SHELL_COMPLETE_REQ of complete_request
  5. | SHELL_HISTORY_REQ of history_request
  6. | SHELL_IS_COMPLETE_REQ of is_complete_request
  7. | SHELL_CONNECT_REQ
  8. | SHELL_COMM_INFO_REQ of comm_info_request
  9. | SHELL_SHUTDOWN_REQ of shutdown
  10. | SHELL_COMM_OPEN of Comm.t
  11. | SHELL_COMM_MSG of Comm.t
  12. | SHELL_COMM_CLOSE of Comm.t
val request_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> request
val yojson_of_request : request -> Ppx_yojson_conv_lib.Yojson.Safe.t

Reply

type reply =
  1. | SHELL_KERNEL_INFO_REP of kernel_info_reply
  2. | SHELL_EXEC_REP of exec_reply
  3. | SHELL_INSPECT_REP of inspect_reply
  4. | SHELL_COMPLETE_REP of complete_reply
  5. | SHELL_HISTORY_REP of history_reply
  6. | SHELL_IS_COMPLETE_REP of is_complete_reply
  7. | SHELL_CONNECT_REP of connect_reply
  8. | SHELL_COMM_INFO_REP of comm_info_reply
  9. | SHELL_SHUTDOWN_REP of shutdown
val reply_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> reply
val yojson_of_reply : reply -> Ppx_yojson_conv_lib.Yojson.Safe.t
val execute_reply : count:int -> status Json.enum -> reply
OCaml

Innovation. Community. Security.