Skip to main content

async-kernel

pypi downloads CI Ruff uv basedpyright - checked Built with Material for MkDocs codecov

logo-svg

async-kernel provides Python Jupyter kernels and clients compatible with CPython (Jupyter & VS code) and Pyodide (Jupyterlite).

The kernel interface supports multiple connections including:

  1. Messaging via ZMQ sockets (Jupyter, VS Code, etc).
  2. Same-process local client enabling (Jupyterlite) and user access.

Highlights

  • Built using aiologic thread-safe synchronisation primitives.
  • The Caller class provides a powerful but simple interface for cross-thread code execution in asyncio and trio backends, with guest event loop support built in.
  • A zmq poll event loop for thread-safe zmq sockets.
  • IPython shell
    • top-level await ('asyncio' or 'trio' backend) in cells
    • async magic function support in cells
  • Per-subshell user_ns
  • GUI event loops 1
    • inline
    • ipympl
    • tk host and asyncio2 or trio3 backend running as a guest
    • qt host and asyncio2 or trio3 backend running as a guest
  • Experimental support for Jupyterlite (try it online here 👈)
    • %pip install magic (using micropip)
  • Debugger client
  • Local client.
  • ZMQ client.

Installation

pip install async-kernel

Kernelspecs

A kernelspec with the name 'async' is added when async-kernel is installed.

Kernel specs can be installed/uninstalled via the command line.

async-kernel install

# To install for a user
async-kernel install --user

For further detail about kernel spec customisation see command line and kernel configuration and custom kernel.ipynb.

Faster data serialization

orjson (a fast JSON library) is supported and will be used by default if it has been installed.

Free-threading support

async-kernel's Caller's are thread-local and it's methods are internally synchronised4.

Origin

async-kernel started as a fork of IPyKernel. Thank you to the original contributors of IPyKernel that made async-kernel possible.

  1. A gui (host) enabled kernel interface starts a gui's mainloop (host) which starts the backend as a guest, then finally the Kernel is started.

  2. The asyncio implementation of start_guest_run was written by the author of aiologic and provided as a gist. 2

  3. trio's start_guest_run. 2

  4. free threading terminology

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_kernel-0.22.0.tar.gz (359.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_kernel-0.22.0-py3-none-any.whl (135.2 kB view details)

Uploaded Python 3

File details

Details for the file async_kernel-0.22.0.tar.gz.

File metadata

  • Download URL: async_kernel-0.22.0.tar.gz
  • Upload date:
  • Size: 359.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for async_kernel-0.22.0.tar.gz
Algorithm Hash digest
SHA256 c70c46852ee43612fa1e3af2abb09f48e8da2623c6c58c17be93af472cfcc234
MD5 6fb0582859cfd62397e88e831c4ba8f2
BLAKE2b-256 a49bdc9deea67ada7a5234b20902aafcd43b560a267e499747c228eea6d339ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for async_kernel-0.22.0.tar.gz:

Publisher: publish-to-pypi.yml on fleming79/async-kernel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file async_kernel-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: async_kernel-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 135.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for async_kernel-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 60929111ecc575f05c7f7e43f0ccdfb89f5b4ca3a130fe2230d2a75cf40d50db
MD5 7ddbca080526db7c52b561607611d593
BLAKE2b-256 08c8e8b4d0d519d92b963f7e3f316c2f06a41a90f49c284508eac81cb4832943

See more details on using hashes here.

Provenance

The following attestation bundles were made for async_kernel-0.22.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on fleming79/async-kernel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.22.3

2 files

0.22.2

2 files

0.22.1

2 files

This release

0.22.0 This release

2 files

0.21.0

2 files

0.20.2

2 files

0.20.1

2 files

0.20.0

2 files

0.19.2

2 files

0.19.1

2 files

0.19.0

2 files

0.18.3

2 files

0.18.2

2 files

0.18.1

2 files

0.18.0

2 files

0.17.1

2 files

0.17.0

2 files

0.16.4

2 files

0.16.3

2 files

0.16.2

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.5

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.7.0rc1

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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