jupyter-kernel

Library to write jupyter kernels (interactive notebooks)
IN THIS PACKAGE
type content =
| Connect_request
| Comm_info_request of Protocol_t.comm_info_request
| Kernel_info_request
| Shutdown_request of Protocol_t.shutdown
| Interrupt_request
| Execute_request of Protocol_t.execute_request
| Inspect_request of Protocol_t.inspect_request
| Complete_request of Protocol_t.complete_request
| Is_complete_request of Protocol_t.is_complete_request
| History_request of Protocol_t.history_request
| Connect_reply of Protocol_t.connect_reply
| Comm_info_reply
| Kernel_info_reply of Protocol_t.kernel_info_reply
| Shutdown_reply of Protocol_t.shutdown
| Interrupt_reply of Protocol_t.interrupt_reply
| Execute_reply of Protocol_t.execute_reply
| Inspect_reply of Protocol_t.inspect_reply
| Complete_reply of Protocol_t.complete_reply
| Is_complete_reply of Protocol_t.is_complete_reply
| History_reply of Protocol_t.history_reply
| Status of Protocol_t.status
| Execute_input of Protocol_t.pyin
| Execute_result of Protocol_t.pyout
| Execute_error of Protocol_t.execute_error
| Stream of Protocol_t.stream
| Clear of Protocol_t.clear_output
| Display_data of Protocol_t.display_data
| Comm_open
val content_of_json : Protocol_t.header_info -> string -> content
val json_of_content : content -> string
val msg_type_of_content : content -> string
type t = private {
ids : string array;
hmac : string;
header : Protocol_t.header_info;
parent : Protocol_t.header_info;
meta : string;
content : content;
raw : string array;
}
val log : string -> t -> unit
val recv : [ `Router ] Zmq_lwt.Socket.t -> t Lwt.t
val make : parent:t -> msg_type:string -> content -> t

make a message with the given type and content, copying header from parent

val make_first : msg_type:string -> content -> t

make a message with the given type and content, with a fresh header

val send : ?key:string -> [< `Router | `Pub ] Zmq_lwt.Socket.t -> t -> unit Lwt.t

send sock msg sends the message.

  • parameter key

    the shared key for signing messages

val wrap_retry : ( 'a -> 'b Lwt.t ) -> 'a -> 'b Lwt.t

Wrapper to retry upon EAGAIN