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.3.tar.gz (362.9 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.3-py3-none-any.whl (135.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_kernel-0.22.3.tar.gz
  • Upload date:
  • Size: 362.9 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.3.tar.gz
Algorithm Hash digest
SHA256 1cb1f7ed600b2f2ed73ec82761aa6da846f8baad0711aeed4b837622112f184a
MD5 1eee9c9a84b52a43f2f2951d2d1f23fe
BLAKE2b-256 c7b3646d99c804410bb7ab2e0f10b36a0950f2f7510b84b1ffea14066b2abbf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for async_kernel-0.22.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: async_kernel-0.22.3-py3-none-any.whl
  • Upload date:
  • Size: 135.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e5fc83b7d08db72ed258787e6d232427a7b0c641c252b678abb5162ee35489ae
MD5 634f3a1f1e2b084f22483795eddc7a8f
BLAKE2b-256 060f20f2816c1c86780005249d84e364201f3f50e0c0506b5f25292cdf1c53d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for async_kernel-0.22.3-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

This release

0.22.3 This release

2 files

0.22.2

2 files

0.22.1

2 files

0.22.0

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