jupyter

An OCaml kernel for Jupyter notebook
IN THIS PACKAGE
Module Jupyter . Iopub

Streams

type stream_name =
| IOPUB_STDOUT
| IOPUB_STDERR
val stream_name_to_yojson : stream_name -> Yojson.Safe.t
type stream = {
stream_name : stream_name Json.enum;
stream_text : string;
}
val stream_to_yojson : stream -> Yojson.Safe.t

Display data

type transient = {
display_id : string;
}
val transient_to_yojson : transient -> Yojson.Safe.t
type display_data = {
display_data : Yojson.Safe.t;
display_metadata : Yojson.Safe.t;
display_transient : transient option;
}
val display_data_to_yojson : display_data -> Yojson.Safe.t

Code inputs

type exec_input = {
exin_code : string;
exin_count : int;
}
val exec_input_to_yojson : exec_input -> Yojson.Safe.t

Execution results

type exec_result = {
exres_count : int;
exres_data : Yojson.Safe.t;
exres_metadata : Yojson.Safe.t;
}
val exec_result_to_yojson : exec_result -> Yojson.Safe.t

Kernel status

type exec_status =
| IOPUB_BUSY
| IOPUB_IDLE
| IOPUB_STARTING
val exec_status_to_yojson : exec_status -> Yojson.Safe.t
type status = {
kernel_state : exec_status Json.enum;
}
val status_to_yojson : status -> Yojson.Safe.t

Execution errors

type error = {
ename : string;
evalue : string;
traceback : string list;
}
val error_to_yojson : error -> Yojson.Safe.t

Clear output

type clear_output = {
clear_wait : bool;
}
val clear_output_to_yojson : clear_output -> Yojson.Safe.t

IOPUB Request

type request = unit
val request_to_yojson : request -> Yojson.Safe.t

IOPUB Reply

type reply =
| IOPUB_STREAM of stream
| IOPUB_DISPLAY_DATA of display_data
| IOPUB_UPDATE_DISPLAY_DATA of display_data
| IOPUB_EXECUTE_INPUT of exec_input
| IOPUB_EXECUTE_RESULT of exec_result
| IOPUB_ERROR of error
| IOPUB_STATUS of status
| IOPUB_CLEAR_OUTPUT of clear_output
| IOPUB_COMM_OPEN of Comm.t
| IOPUB_COMM_MSG of Comm.t
| IOPUB_COMM_CLOSE of Comm.t
val reply_to_yojson : reply -> Yojson.Safe.t
val stream : name:stream_name Json.enum -> string -> reply
val execute_result : ?metadata:Yojson.Safe.t -> count:int -> Yojson.Safe.t -> reply
val error : ?name:string -> value:string -> string list -> reply