package jupyter-kernel

  1. Overview
  2. Docs
type content =
  1. | Connect_request
  2. | Comm_info_request of Protocol_t.comm_info_request
  3. | Kernel_info_request
  4. | Shutdown_request of Protocol_t.shutdown
  5. | Execute_request of Protocol_t.execute_request
  6. | Inspect_request of Protocol_t.inspect_request
  7. | Complete_request of Protocol_t.complete_request
  8. | Is_complete_request of Protocol_t.is_complete_request
  9. | History_request of Protocol_t.history_request
  10. | Connect_reply of Protocol_t.connect_reply
  11. | Comm_info_reply
  12. | Kernel_info_reply of Protocol_t.kernel_info_reply
  13. | Shutdown_reply of Protocol_t.shutdown
  14. | Execute_reply of Protocol_t.execute_reply
  15. | Inspect_reply of Protocol_t.inspect_reply
  16. | Complete_reply of Protocol_t.complete_reply
  17. | Is_complete_reply of Protocol_t.is_complete_reply
  18. | History_reply of Protocol_t.history_reply
  19. | Status of Protocol_t.status
  20. | Execute_input of Protocol_t.pyin
  21. | Execute_result of Protocol_t.pyout
  22. | Execute_error of Protocol_t.execute_error
  23. | Stream of Protocol_t.stream
  24. | Clear of Protocol_t.clear_output
  25. | Display_data of Protocol_t.display_data
  26. | 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 {
  1. ids : string array;
  2. hmac : string;
  3. header : Protocol_t.header_info;
  4. parent : Protocol_t.header_info;
  5. meta : string;
  6. content : content;
  7. raw : string array;
}
val log : string -> t -> unit
val recv : [ `Router ] Lwt_zmq.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 ] Lwt_zmq.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