jupywire
Minimal Jupyter protocol commons: wire-format sessions (message construction, HMAC signing, frame serialize/deserialize) and kernel-client call conventions, shared by kernmini, jupygate, jupyasyncclient, and conkernelclient.
What's here
jupywire.session:Session— Jupyter protocol messages: construction, HMAC signing, frame (de)serialization, replay protection — plus the websocket JSON/binary frame helpers (dumps/loads,serialize_binary_message/deserialize_binary_message) andvalidate_string_dict.jupywire.connect:write_connection_file— kernel connection files with random free-port selection, written 0600.jupywire.route:RouterOpsandJmsgQueues— message handling for kernel clients.reply()awaits oneexecute_reply;run()collects every message one execute causes, streams throughon_output, and turns eachon_stdinreturn value into the correctly parentedinput_reply(stdin is disabled when that hook is absent). Everything unmatched goes to the app'son_jmsgcallback, withJmsgQueuesas the pull adapter. A genericrequestsends any named protocol request, withshell/controlsugar and the typed verbs (complete,inspect,check,history,comm_msg) on top. The transport suppliesexecute,send, asession, and a read loop feedingroute. DESIGN.md states the full contract;tests/test_route.pyis the conformance suite both clients inherit.jupywire.ops:EvalOps— a mixin giving any kernel client the calling conventions (eval,ipy, theipyfuncsservice methods,retr,eval_expr/user_exprs, and the sync fire-and-forgetxpush/xenv) over two abstract methods supplied by the transport:reply, which awaits the shell reply, andexecute, which sends without awaiting one.
Install
pip install jupywire
Credits
jupywire.session and jupywire.connect are adapted from jupyter_client (jupyter_client.session, jupyter_client.connect, jupyter_client.client), Copyright (c) Jupyter Development Team, distributed under the terms of the Modified BSD License (BSD-3-Clause); see that project's COPYING.md.
The adaptations are trimmed, traitlets-free mirrors that stay wire-compatible. Divergences are noted in each module's docstring.
Release files for jupywire 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupywire-0.1.6.tar.gz | 24.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupywire-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.7 kB
Release files / jupywire-0.1.6.tar.gz
| Download URL | jupywire-0.1.6.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fd04a6d70cb368b9c3f22ac01f5fc394bb9df80418c34d862b07d331d3e8ef8
|
|
BLAKE2b-256 checksum How to use checksums |
cac20bec47625460ebb1f617649673b0ee17d4ba6f424d9e9dcd4de5f9ef6d15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / jupywire-0.1.6-py3-none-any.whl
| Download URL | jupywire-0.1.6-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46bdedf348819f88f4152e95b6f28707911e7713cf86e72ab1199b77a558300e
|
|
BLAKE2b-256 checksum How to use checksums |
15ca2bdaf9ae1a89be091ac3557d8ce55f0f8c16eaeb8f8431f4df82a5415999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|