Skip to main content

Crate runtimelib

Crate runtimelib 

Source
👎Deprecated since 3.0.0:

runtimelib has been renamed to jupyter-zmq-client. Depend on jupyter-zmq-client directly; this crate is a thin re-export shim.

Expand description

§runtimelib (deprecated — renamed to jupyter_zmq_client)

This crate has been renamed to jupyter-zmq-client.

runtimelib is now a thin re-export shim published for backwards compatibility. New code should depend on jupyter-zmq-client directly and import from jupyter_zmq_client::… instead of runtimelib::….

§Migration

# before
runtimelib = { version = "2", features = ["tokio-runtime"] }

# after
jupyter-zmq-client = { version = "1", features = ["tokio-runtime"] }
// before
use runtimelib::{create_client_shell_connection, list_kernelspecs};

// after
use jupyter_zmq_client::{create_client_shell_connection, list_kernelspecs};

The feature flags (tokio-runtime, async-dispatcher-runtime, ring, aws-lc-rs, test-kernel) behave identically and are forwarded to jupyter-zmq-client unchanged.

Modules§

connection
Interfacing and connecting with Jupyter kernels
dirs
kernelspec

Structs§

ClearOutput
Clear output of a single cell / output area.
ClientHeartbeatConnection
CodeMirrorModeObject
CommClose
A comm_close message on the iopub channel.
CommId
CommInfo
CommInfoReply
CommInfoRequest
CommMsg
A comm_msg message on the iopub channel.
CommOpen
A comm_open message on the iopub channel.
CompleteReply
A reply containing code completion suggestions.
CompleteRequest
A request for code completion suggestions.
Connection
ConnectionInfo
Represents the runtime connection information for a Jupyter kernel.
DebugReply
DebugRequest
DisplayData
A display_data message on the iopub channel.
ErrorOutput
An error message on the iopub channel. See Error.
ExecuteInput
An execute_input message on the iopub channel. See Execute Input.
ExecuteReply
A reply to an execute request. This is not the output of execution, as this is the reply over the shell socket. Any number of outputs can be emitted as StreamContent, DisplayData, UpdateDisplayData, ExecuteResult, and ErrorOutput. This message is used to communicate the status of the execution request, the execution count, and any user expressions that were requested.
ExecuteRequest
A request for code execution.
ExecuteResult
An execute_result message on the iopub channel. See Execute Result.
ExecutionCount
Represents a monotonically increasing counter for tracking the number of code executions in a Jupyter session. This count is maintained across all executions, including those in notebook cells and via terminal execute_requests.
Header
Represents a Jupyter message header.
HelpLink
HistoryReply
A reply containing execution history.
InputReply
Reply to an input request.
InputRequest
Request for input from the frontend.
InspectReply
InspectRequest
A inspect_request message on the shell channel.
InterruptReply
Reply to an interrupt request.
InterruptRequest
Request to interrupt the kernel.
IoPubWelcome
An iopub_welcome message on the iopub channel.
IsCompleteReply
IsCompleteRequest
A request to check if the code is complete and ready for execution.
JupyterMessage
A message in the Jupyter protocol format.
KernelHeartbeatConnection
KernelInfoReply
A reply containing information about the kernel.
KernelInfoRequest
A request for information about the kernel.
KernelspecDir
A pointer to a kernelspec directory, with name and specification
LanguageInfo
Media
A Media is a collection of data associated with different Media types. It allows for the representation of rich content that can be displayed in multiple formats. These are found in the data field of a DisplayData and ExecuteResult messages/output types.
PeerIdentity
RawMessage
ReplyError
ShutdownReply
Reply to a shutdown request.
ShutdownRequest
Request to shut down the kernel.
Status
A message indicating the current status of the kernel.
StreamContent
A stream message on the iopub channel. These are also known as “stdout” and “stderr”.
Transient
Optional metadata for a display data to allow for updating an output.
UnknownMessage
Unknown message types are a workaround for generically unknown messages.
UpdateDisplayData
An update_display_data message on the iopub channel. See Update Display Data.

Enums§

Channel
Represents the different channels in the Jupyter messaging protocol.
CodeMirrorMode
ExecutionState
ExpressionResult
The result of evaluating a single user expression, as returned in an execute_reply.
HistoryEntry
HistoryRequest
IsCompleteReplyStatus
JupyterMessageContent
MediaType
An enumeration representing various Media types, otherwise known as MIME (Multipurpose Internet Mail Extensions) types. These types are used to indicate the nature of the data in a rich content message such as DisplayData, UpdateDisplayData, and ExecuteResult.
Payload
Payloads are a way to trigger frontend actions from the kernel. They are stated as deprecated, however they are in regular use via ? in IPython
ReplyStatus
All reply messages have a status field.
RuntimeError
Stdio
SubscriptionEvent
Represents a subscription event from an XPUB socket.

Functions§

ask_jupyter
config_dirs
create_client_control_connection
create_client_heartbeat_connection
create_client_iopub_connection
create_client_shell_connectionDeprecated
Deprecated: Creates a shell connection with a random ZMQ identity, which breaks stdin support. Use create_client_shell_connection_with_identity with a PeerIdentity from peer_identity_for_session instead.
create_client_shell_connection_with_identity
Create a client shell connection with a specific ZMQ peer identity.
create_client_stdin_connectionDeprecated
Deprecated: Creates a stdin connection with a random ZMQ identity, which won’t receive input_request messages from the kernel. Use create_client_stdin_connection_with_identity with the same PeerIdentity used for the shell connection instead.
create_client_stdin_connection_with_identity
Create a client stdin connection with a specific ZMQ peer identity.
create_kernel_control_connection
create_kernel_heartbeat_connection
create_kernel_iopub_connection
create_kernel_iopub_xpub_connection
Create a kernel IOPub connection using XPUB socket (JEP 65).
create_kernel_shell_connection
create_kernel_stdin_connection
data_dirs
data_dirs_with_jupyter_paths
Like data_dirs but also includes paths reported by jupyter --paths --json, so virtualenv-installed kernels are visible. Falls back to data_dirs if jupyter is unavailable.
deserialize_parent_header
Deserializes the parent_header of a JupyterMessage.
parse_subscription_message
Parse a subscription message from an XPUB socket.
peek_ports
Find a set of open ports. This function creates a listener with the port set to 0. The listener is closed at the end of the function when the listener goes out of scope.
peek_ports_with_listeners
Find a set of open ports and return both the port numbers and the TcpListeners holding them.
peer_identity_for_session
Create a PeerIdentity from a session ID.
runtime_dir
system_config_dirs
system_data_dirs
user_data_dir

Type Aliases§

ClientControlConnection
ClientIoPubConnection
ClientShellConnection
ClientStdinConnection
DealerRecvConnection
DealerSendConnection
KernelControlConnection
KernelIoPubConnection
KernelIoPubXPubConnection
Kernel IOPub connection using XPUB socket (JEP 65).
KernelShellConnection
KernelStdinConnection
Result
RouterRecvConnection
RouterSendConnection