Package-level declarations

Types

Link copied to clipboard
class AbortJupyterResponse(val stdErr: String?, val metadata: EvaluatedSnippetMetadata? = null) : JupyterResponse
Link copied to clipboard
@Serializable
abstract class AbortReplyContent : MessageReplyContent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
class ClearOutputMessage(val wait: Boolean) : MessageContent
Link copied to clipboard
@Serializable
class Comm(val targetName: String)
Link copied to clipboard
@Serializable
class CommCloseMessage(val commId: String, val data: JsonObject = Json.EMPTY) : MessageContent
Link copied to clipboard
@Serializable
class CommInfoReply(val comms: Map<String, Comm>) : OkReplyContent
Link copied to clipboard
@Serializable
class CommInfoRequest(val targetName: String? = null) : MessageContent
Link copied to clipboard
@Serializable
class CommMsgMessage(val commId: String, val data: JsonObject = Json.EMPTY) : MessageContent
Link copied to clipboard
@Serializable
class CommOpenMessage(val commId: String, val targetName: String, val data: JsonObject = Json.EMPTY) : MessageContent
Link copied to clipboard
@Serializable
class CompleteErrorReply(val name: String, val value: String, val traceback: List<String>) : ErrorReplyContent
Link copied to clipboard
@Serializable
class CompleteReply(val matches: List<String>, val cursorStart: Int, val cursorEnd: Int, val paragraph: Paragraph, val metadata: CompleteReply.Metadata) : OkReplyContent
Link copied to clipboard
@Serializable
class CompleteRequest(val code: String, val cursorPos: Int) : MessageContent
Link copied to clipboard
@Serializable(with = ConnectReplySerializer::class)
class ConnectReply(val ports: JsonObject) : MessageContent
Link copied to clipboard
@Serializable
class ConnectRequest : MessageContent
Link copied to clipboard
@Serializable
class DebugEventMessage : MessageContent
Link copied to clipboard
@Serializable
class DebugReply : MessageContent
Link copied to clipboard
@Serializable
class DebugRequest : MessageContent
Link copied to clipboard
Link copied to clipboard
@Serializable
class DisplayDataMessage(val data: JsonElement? = null, val metadata: JsonElement? = null, val transient: JsonElement? = null) : MessageContent
Link copied to clipboard
class ErrorJupyterResponse(val stdErr: String?, val exception: ReplException? = null, val metadata: EvaluatedSnippetMetadata? = null) : JupyterResponse
Link copied to clipboard
@Serializable
abstract class ErrorReplyContent : MessageReplyContent
Link copied to clipboard
Link copied to clipboard
@Serializable
class ExecuteErrorReply(val executionCount: ExecutionCount, val name: String, val value: String, val traceback: List<String>, val additionalInfo: JsonObject) : ErrorReplyContent, ExecuteReply
Link copied to clipboard
@Serializable
class ExecuteInput(val code: String, val executionCount: ExecutionCount) : MessageContent
Link copied to clipboard
@Serializable(with = ExecuteReplySerializer::class)
sealed interface ExecuteReply : MessageContent
Link copied to clipboard
@Serializable
data class ExecuteReplyMetadata(val dependenciesMet: Boolean = true, val engine: String, val status: MessageStatus, val startedTime: String, val evalMetadata: EvaluatedSnippetMetadata?)
Link copied to clipboard
@Serializable
data class ExecuteRequest(val code: String, val silent: Boolean = false, val storeHistory: Boolean = true, val userExpressions: Map<String, String> = mapOf(), val userVariables: List<String> = listOf(), val allowStdin: Boolean = true, val stopOnError: Boolean = true) : MessageContent
Link copied to clipboard
@Serializable
class ExecuteResult(val data: JsonElement, val metadata: JsonElement, val executionCount: ExecutionCount) : MessageContent
Link copied to clipboard
@Serializable
class ExecuteSuccessReply(val executionCount: ExecutionCount, val payload: List<Payload> = listOf(), val userExpressions: Map<String, JsonElement> = mapOf(), val additionalInfo: JsonObject? = null) : OkReplyContent, ExecuteReply
Link copied to clipboard
@Serializable
value class ExecutionCount(val value: Int)

Typesafe wrapper for execution counts created by ExecutionCounter.

Link copied to clipboard
class ExecutionCounter(initialValue: Int)

Class responsible for tracking the execution count that is sent from the kernel to the client for all execution requests. It should be sent back to the client in execute_reply and execute_input messages.

Link copied to clipboard
@Serializable
class HelpLink(val text: String, val url: String)
Link copied to clipboard
@Serializable
class HistoryReply(val history: List<String>) : OkReplyContent
Link copied to clipboard
@Serializable
class HistoryRequest(val output: Boolean, val raw: Boolean, val hist_access_type: String, val session: Int? = null, val start: Int? = null, val stop: Int? = null, val n: Int? = null, val pattern: String? = null, val unique: Boolean? = null) : MessageContent
Link copied to clipboard
open class IdeCompatibleMessageRequestProcessor(rawIncomingMessage: RawMessage, messageFactoryProvider: MessageFactoryProvider, val socketManager: JupyterBaseSockets, commManager: CommManagerInternal, executor: JupyterExecutor, executionCounter: ExecutionCounter, loggerFactory: KernelLoggerFactory, repl: ReplForJupyter) : AbstractMessageRequestProcessor, JupyterCommunicationFacility
Link copied to clipboard
@Serializable
class InputReply(val value: String) : MessageContent
Link copied to clipboard
@Serializable
class InputRequest(val prompt: String, val password: Boolean = false) : MessageContent
Link copied to clipboard
@Serializable
class InspectReply(val found: Boolean, val data: JsonObject = Json.EMPTY, val metadata: JsonObject = Json.EMPTY) : OkReplyContent
Link copied to clipboard
@Serializable
class InspectRequest(val code: String, val cursorPos: Int, val detailLevel: DetailLevel) : MessageContent
Link copied to clipboard
@Serializable
class InterruptReply : OkReplyContent
Link copied to clipboard
@Serializable
class InterruptRequest : MessageContent
Link copied to clipboard
@Serializable
class IsCompleteReply(val status: String, val indent: String? = null) : MessageContent
Link copied to clipboard
@Serializable
class IsCompleteRequest(val code: String) : MessageContent
Link copied to clipboard

Interface describing the sockets available in a Jupyter Kernel.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface JupyterResponse
Link copied to clipboard

Interface responsible for controlling the lifecycle of kernel sockets.

Link copied to clipboard
@Serializable
class KernelInfoReply(val protocolVersion: String, val implementation: String, val implementationVersion: String, val banner: String, val languageInfo: LanguageInfo, val helpLinks: List<HelpLink>) : OkReplyContent
Link copied to clipboard
@Serializable
class KernelInfoReplyMetadata(val state: EvaluatedSnippetMetadata)
Link copied to clipboard
@Serializable
class KernelInfoRequest : MessageContent
Link copied to clipboard
@Serializable
enum KernelStatus : Enum<KernelStatus>
Link copied to clipboard
@Serializable
class ListErrorsReply(val code: String, val errors: List<ScriptDiagnostic>) : MessageContent
Link copied to clipboard
@Serializable
class ListErrorsRequest(val code: String) : MessageContent
Link copied to clipboard
data class Message(val id: List<ByteArray> = listOf(), val data: MessageData = MessageData())
Link copied to clipboard
sealed interface MessageContent

Top-level interface for the generic content part of a Jupyter message. See https://jupyter-client.readthedocs.io/en/latest/messaging.html#content

Link copied to clipboard
@Serializable(with = MessageDataSerializer::class)
data class MessageData(val header: MessageHeader? = null, val parentHeader: MessageHeader? = null, val metadata: JsonElement? = null, val content: MessageContent? = null)

Class representing general messages sent across the Jupyter Protocol. See https://jupyter-client.readthedocs.io/en/latest/messaging.html#a-full-message

Link copied to clipboard
interface MessageFactory
Link copied to clipboard
Link copied to clipboard
interface MessageHandler
Link copied to clipboard
@Serializable
data class MessageHeader(val id: String, val type: MessageType, val session: String? = null, val username: String? = null, val version: String? = null, val date: String? = null)
Link copied to clipboard
@Serializable
sealed class MessageReplyContent : MessageContent

Top-level class for the content of "reply" messages. This class is abstract with status as a constructor parameter so we can serialize the status field. In an ideal world, this would be an interface instead.

Link copied to clipboard
Link copied to clipboard
@Serializable
enum MessageStatus : Enum<MessageStatus>

See https://jupyter-client.readthedocs.io/en/latest/messaging.html#request-reply for the definition of these values.

Link copied to clipboard

See https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-shell-router-dealer-channel for details on how these messages are defined and how they are used in the Jupyter protocol.

Link copied to clipboard
Link copied to clipboard
class OkJupyterResponse(val displayResult: DisplayResult?, val metadata: EvaluatedSnippetMetadata? = null) : JupyterResponse
Link copied to clipboard
@Serializable
abstract class OkReplyContent : MessageReplyContent
Link copied to clipboard
@Serializable
class OpenDebugPortReply(val port: Int?) : OkReplyContent
Link copied to clipboard
@Serializable
class Paragraph(val cursor: Int, val text: String)

Data wrapper used by custom code completion events.

Link copied to clipboard
@Serializable
class Payload(val source: String)
Link copied to clipboard
Link copied to clipboard
@Serializable
class ShutdownReply(val restart: Boolean) : OkReplyContent
Link copied to clipboard
@Serializable
class ShutdownRequest(val restart: Boolean) : MessageContent
Link copied to clipboard
Link copied to clipboard
@Serializable
class StatusMessage(val status: KernelStatus) : MessageContent
Link copied to clipboard
@Serializable
class StreamMessage(val name: String, val text: String) : MessageContent
Link copied to clipboard
@Serializable
class UpdateClientMetadataErrorReply(val name: String, val value: String, val traceback: List<String>) : ErrorReplyContent, UpdateClientMetadataReply
Link copied to clipboard
@Serializable
class UpdateClientMetadataRequest(val absoluteNotebookFilePath: Path) : MessageContent

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun JupyterCommunicationFacility.getInput(prompt: String = DefaultPromptOptions.PROMPT, password: Boolean = DefaultPromptOptions.IS_PASSWORD): String
Link copied to clipboard
fun makeHeader(type: MessageType, sessionId: String?, username: String?): MessageHeader
fun makeHeader(msgType: MessageType? = null, incomingMsg: RawMessage? = null, sessionId: String? = null): MessageHeader
Link copied to clipboard
fun makeReplyMessage(msg: RawMessage, msgType: MessageType? = null, sessionId: String? = null, header: MessageHeader? = null, parentHeader: MessageHeader? = null, metadata: JsonElement? = null, content: MessageContent? = null): Message
Link copied to clipboard
fun MessageFactory.makeReplyMessage(msgType: MessageType? = null, sessionId: String? = null, header: MessageHeader? = null, parentHeader: MessageHeader? = null, metadata: JsonElement? = null, content: MessageContent? = null): Message
Link copied to clipboard
Link copied to clipboard
fun JupyterCommunicationFacility.sendError(response: JupyterResponse, executionCount: ExecutionCount, startedTime: String)

Send a message to clients of the type "error" as the response to an "execute_request" message that resulted in the REPL throwing an exception.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun JupyterCommunicationFacility.sendResponse(response: JupyterResponse, executionCount: ExecutionCount, startedTime: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun toAbortErrorReply(executionCount: ExecutionCount, message: String?): ExecuteErrorReply
Link copied to clipboard

For errors in the user's REPL code, return a reply that includes the location in the user's code if it is available.

Link copied to clipboard
Link copied to clipboard