👎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§
- Clear
Output - Clear output of a single cell / output area.
- Client
Heartbeat Connection - Code
Mirror Mode Object - Comm
Close - A
comm_closemessage on theiopubchannel. - CommId
- Comm
Info - Comm
Info Reply - Comm
Info Request - CommMsg
- A
comm_msgmessage on theiopubchannel. - Comm
Open - A
comm_openmessage on theiopubchannel. - Complete
Reply - A reply containing code completion suggestions.
- Complete
Request - A request for code completion suggestions.
- Connection
- Connection
Info - Represents the runtime connection information for a Jupyter kernel.
- Debug
Reply - Debug
Request - Display
Data - A
display_datamessage on theiopubchannel. - Error
Output - An
errormessage on theiopubchannel. See Error. - Execute
Input - An
execute_inputmessage on theiopubchannel. See Execute Input. - Execute
Reply - A reply to an execute request. This is not the output of execution, as this is the reply over
the
shellsocket. Any number of outputs can be emitted asStreamContent,DisplayData,UpdateDisplayData,ExecuteResult, andErrorOutput. This message is used to communicate the status of the execution request, the execution count, and any user expressions that were requested. - Execute
Request - A request for code execution.
- Execute
Result - An
execute_resultmessage on theiopubchannel. See Execute Result. - Execution
Count - 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.
- Help
Link - History
Reply - A reply containing execution history.
- Input
Reply - Reply to an input request.
- Input
Request - Request for input from the frontend.
- Inspect
Reply - Inspect
Request - A
inspect_requestmessage on theshellchannel. - Interrupt
Reply - Reply to an interrupt request.
- Interrupt
Request - Request to interrupt the kernel.
- IoPub
Welcome - An
iopub_welcomemessage on theiopubchannel. - IsComplete
Reply - IsComplete
Request - A request to check if the code is complete and ready for execution.
- Jupyter
Message - A message in the Jupyter protocol format.
- Kernel
Heartbeat Connection - Kernel
Info Reply - A reply containing information about the kernel.
- Kernel
Info Request - A request for information about the kernel.
- Kernelspec
Dir - A pointer to a kernelspec directory, with name and specification
- Language
Info - Media
- A
Mediais 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 thedatafield of aDisplayDataandExecuteResultmessages/output types. - Peer
Identity - RawMessage
- Reply
Error - Shutdown
Reply - Reply to a shutdown request.
- Shutdown
Request - Request to shut down the kernel.
- Status
- A message indicating the current status of the kernel.
- Stream
Content - A
streammessage on theiopubchannel. These are also known as “stdout” and “stderr”. - Transient
- Optional metadata for a display data to allow for updating an output.
- Unknown
Message - Unknown message types are a workaround for generically unknown messages.
- Update
Display Data - An
update_display_datamessage on theiopubchannel. See Update Display Data.
Enums§
- Channel
- Represents the different channels in the Jupyter messaging protocol.
- Code
Mirror Mode - Execution
State - Expression
Result - The result of evaluating a single user expression, as returned in an
execute_reply. - History
Entry - History
Request - IsComplete
Reply Status - Jupyter
Message Content - Media
Type - 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, andExecuteResult. - 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 - Reply
Status - All reply messages have a
statusfield. - Runtime
Error - Stdio
- Subscription
Event - 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_ connection Deprecated - Deprecated: Creates a shell connection with a random ZMQ identity, which
breaks stdin support. Use
create_client_shell_connection_with_identitywith aPeerIdentityfrompeer_identity_for_sessioninstead. - create_
client_ shell_ connection_ with_ identity - Create a client shell connection with a specific ZMQ peer identity.
- create_
client_ stdin_ connection Deprecated - 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_identitywith the samePeerIdentityused 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_dirsbut also includes paths reported byjupyter --paths --json, so virtualenv-installed kernels are visible. Falls back todata_dirsifjupyteris unavailable. - deserialize_
parent_ header - Deserializes the
parent_headerof aJupyterMessage. - 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
PeerIdentityfrom a session ID. - runtime_
dir - system_
config_ dirs - system_
data_ dirs - user_
data_ dir
Type Aliases§
- Client
Control Connection - Client
IoPub Connection - Client
Shell Connection - Client
Stdin Connection - Dealer
Recv Connection - Dealer
Send Connection - Kernel
Control Connection - Kernel
IoPub Connection - Kernel
IoPubX PubConnection - Kernel IOPub connection using XPUB socket (JEP 65).
- Kernel
Shell Connection - Kernel
Stdin Connection - Result
- Router
Recv Connection - Router
Send Connection