Skip to main content

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) and validate_string_dict.
  • jupywire.connect: write_connection_file — kernel connection files with random free-port selection, written 0600.
  • jupywire.route: RouterOps and JmsgQueues — message handling for kernel clients. reply() awaits one execute_reply; run() sends at call time and returns an async generator of every message one execute causes (exec_outs is its listified, rendered form), and turns each on_stdin return value into the correctly parented input_reply (stdin is disabled when that hook is absent). Everything unmatched goes to the app's on_jmsg callback, with JmsgQueues as the pull adapter. A generic request sends any named protocol request, with shell/control sugar and typed verbs (complete, inspect, check, history, comm_msg) on top. The transport supplies execute, send, a session, and a read loop feeding route. DESIGN.md states the full contract; tests/test_route.py is the conformance suite both clients inherit.
  • jupywire.ops: EvalOps — a mixin giving any kernel client the calling conventions (eval, ipy, the ipyfuncs service methods, retr, eval_expr/user_exprs, and the sync fire-and-forget xpush/xenv) over reply, which awaits the shell reply, and execute, which sends without awaiting one. sidecar_=True tags an evaluation for the persistent sidecar; kernmini creates a missing named subshell on first use. Variable operations default to that serial sidecar lane, while ordinary eval defaults to the main shell.

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.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupywire 0.1.9
File Size Uploaded
jupywire-0.1.9.tar.gz 24.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupywire 0.1.9
File Interpreter ABI Platform
jupywire-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 43.7 kB

Release files / jupywire-0.1.9.tar.gz

Download URL jupywire-0.1.9.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f0c0593d2a41ab9502180ca8d07e0ebd4207a86e1f550d1c78e12ac01debd41f
BLAKE2b-256 checksum
How to use checksums
bb2b42c4f603353c5d775c40ef750d7ac7286fc422fd66c6e90b719a4c46e4fe
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.9-py3-none-any.whl

Download URL jupywire-0.1.9-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fa1540320cfc1f5e2de0fa046e5c290002271038488ebe8867e2a56ad43182d
BLAKE2b-256 checksum
How to use checksums
b8a754d0de5a44c7026488e85d7a8861553100bab7e7c82b8060d3c70c35867f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page