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.1.tar.gz (359.6 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.1-py3-none-any.whl (135.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_kernel-0.22.1.tar.gz
  • Upload date:
  • Size: 359.6 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.1.tar.gz
Algorithm Hash digest
SHA256 ff6e390f8af3f6472a2a296c69683e73545a3abea7b11245fc0748253bf7d853
MD5 68b9a091acfed90151fb7b722b77d246
BLAKE2b-256 5b798c216a4432b3fbe0238fde907e26a49e523b485f504597335fd83607f9a5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: async_kernel-0.22.1-py3-none-any.whl
  • Upload date:
  • Size: 135.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1930af492b0bc60b2c5d479002834a5d47792640ef5dff7b16e3c7d5c4efdfd2
MD5 4424b0bcf9a113c45eea289eee6dae56
BLAKE2b-256 b74fa99528ec74757101546665a5f5da4503d24446b81ec5d640eea5f4a1d095

See more details on using hashes here.

Provenance

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

This release

0.22.1 This release

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