Metadata-Version: 2.5
Name: akernel
Version: 0.4.0
Summary: An asynchronous Python Jupyter kernel
Project-URL: Homepage, https://github.com/davidbrochart/akernel
Author-email: David Brochart <david.brochart@gmail.com>
License: MIT
License-File: LICENSE
Keywords: jupyter
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Requires-Dist: anyio<5.0.0,>=4.14.2
Requires-Dist: comm<1,>=0.1.3
Requires-Dist: python-dateutil
Requires-Dist: rich<15,>=14.0
Provides-Extra: subprocess
Requires-Dist: cyclopts<5.0.0,>=4.22.2; extra == 'subprocess'
Requires-Dist: zmq-anyio<0.5.0,>=0.4.1; extra == 'subprocess'
Description-Content-Type: text/markdown

[![Build Status](https://github.com/davidbrochart/akernel/workflows/CI/badge.svg)](https://github.com/davidbrochart/akernel/actions)

# akernel

An asynchronous Python Jupyter kernel built on AnyIO:
- runs in a separate process or in-process.
- supports top-level `await`.

## Install

For a standalone, out-of-process kernel, install the `subprocess` extra:

```bash
pip install "akernel[subprocess]"
```

This will give you a `Python 3 (akernel)` in JupyterLab.

`akernel` can also run in-process with [Jupyverse](https://github.com/jupyter-server/jupyverse).
Install it with:

```bash
pip install "fps-akernel-task"
```

This will give you both `Python 3 (akernel)` and `Python 3 (akernel-thread)` kernels
in JupyterLab.

## In-process kernels

They run in Jupyverse's process, so running blocking user code in the kernel
will also block Jupyverse.

`akernel-thread` is an in-process kernel that runs user code in a separate thread,
which won't block Jupyverse.

## Limitations

- Cell output redirection currently uses the kernel's `print` function rather
  than capturing all writes to `stdout` and `stderr`.
- In-process kernels cannot be interrupted while running blocking code.
