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. | Interrupt_request
  6. | Execute_request of Protocol_t.execute_request
  7. | Inspect_request of Protocol_t.inspect_request
  8. | Complete_request of Protocol_t.complete_request
  9. | Is_complete_request of Protocol_t.is_complete_request
  10. | History_request of Protocol_t.history_request
  11. | Connect_reply of Protocol_t.connect_reply
  12. | Comm_info_reply
  13. | Kernel_info_reply of Protocol_t.kernel_info_reply
  14. | Shutdown_reply of Protocol_t.shutdown
  15. | Interrupt_reply of Protocol_t.interrupt_reply
  16. | Execute_reply of Protocol_t.execute_reply
  17. | Inspect_reply of Protocol_t.inspect_reply
  18. | Complete_reply of Protocol_t.complete_reply
  19. | Is_complete_reply of Protocol_t.is_complete_reply
  20. | History_reply of Protocol_t.history_reply
  21. | Status of Protocol_t.status
  22. | Execute_input of Protocol_t.pyin
  23. | Execute_result of Protocol_t.pyout
  24. | Execute_error of Protocol_t.execute_error
  25. | Stream of Protocol_t.stream
  26. | Clear of Protocol_t.clear_output
  27. | Display_data of Protocol_t.display_data
  28. | 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 ] 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

OCaml

Innovation. Community. Security.