A small, readable, Python-only Jupyter kernel with strong IPython parity.
Project description
ipymini
🛑 WARNING This is a very early, very experimental, purely research project for now. Have fun playing with it, but don't expect it to work, or be supported, or to still exist next week. Perhaps it'll turn out to be useful, and we'll invest in it and maintain it, in which case we'll remove this warning. If you play with it and find issues, have improvement ideas, etc, we're keen to hear, and to research together!
ipymini is a Python-only Jupyter kernel for Python with a small, readable codebase and strong IPython parity.
The design goal is: a small, readable, testable kernel with first‑class IPython behavior.
This was almost entirely implemented by AI, and no human currently fully understands all the generated code, so please be very careful, because we don't actually know what this code does. The AI closely referenced the ipykernel, xeus, xeus-python, and jupyter_kernel_test projects during development. So all credit for this project belongs to the authors of those packages, and to authors of the excellent documentation and specifications referred to (e.g DAP spec; JEPs; etc) - but of course all blame for mistakes is entirely our/AI's fault.
What we’ve aimed to do
- Implement a full Jupyter kernel in pure Python.
- Match
ipykernelbehavior where it matters (IOPub ordering, message shapes, history, inspect, etc.). - Use IPython instead of re‑implementing Python semantics.
- Expand protocol‑level tests (IOPub, interrupts, completions, etc.) to approach upstream parity.
Requirements
- Python 3.11+ recommended (we test with 3.12)
jupyter_client,jupyter_core,ipython,pyzmq
If you need system ZMQ libs on macOS:
brew install libzmq
Install (editable)
From the repo root:
pip install -e .
Optional test deps:
pip install -e ".[test]"
Installing the kernel spec
You have a few options:
Option A: Use the built-in installer
python -m ipymini install --user
Or install into the current environment:
python -m ipymini install --sys-prefix
After either option, you should see it in:
jupyter kernelspec list
Option B: Install the spec into your user Jupyter dir
jupyter kernelspec install --user /path/to/ipymini/share/jupyter/kernels/ipymini
Option C: Use the repo’s JUPYTER_PATH
Set JUPYTER_PATH to include the repo’s share/jupyter:
export JUPYTER_PATH=/path/to/ipymini/share/jupyter:$JUPYTER_PATH
Running manually
ipymini is a normal Jupyter kernel executable. It expects a connection file:
python -m ipymini -f /path/to/connection.json
(When run via Jupyter, that file is created and passed automatically.)
Configuring env and working directory
For per-launch configuration, rely on the kernel launcher:
- KernelManager: pass
envandcwdtostart_kernel(...). - Kernelspec: add an
"env"dict toshare/jupyter/kernels/ipymini/kernel.jsonfor static defaults.
Example (KernelManager):
from jupyter_client import KernelManager
km = KernelManager(kernel_name="ipymini")
km.start_kernel(env={"MY_FLAG": "1"}, cwd="/path/to/workdir")
Optional env flags:
IPYMINI_STOP_ON_ERROR_TIMEOUT: seconds to keep aborting queued executes after an error (default 0.0).
Developer guide
See DEV.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipymini-0.1.7.tar.gz.
File metadata
- Download URL: ipymini-0.1.7.tar.gz
- Upload date:
- Size: 83.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
784347fb28b0b0ee135693d957fcef990c198247b6869dca47f495100878e645
|
|
| MD5 |
9a0153a1fee34e2d9c67ca0e4ec91309
|
|
| BLAKE2b-256 |
969c3d57e3e5e42bd5957d0518ba698fc6908cab70cf3c307a6fb2eb70323b1d
|
File details
Details for the file ipymini-0.1.7-py3-none-any.whl.
File metadata
- Download URL: ipymini-0.1.7-py3-none-any.whl
- Upload date:
- Size: 47.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e40b9b1bac9365450eb9d79cf2530d2caf76d26f5321e8ea3845327b0292ab8
|
|
| MD5 |
0520099a6119714bc2777c01a949b0f1
|
|
| BLAKE2b-256 |
494ab4127ee9004495825c5361c75d560b4594d42d571769ee3c74b80214dca3
|