Hi
This github repository contains code changes to learn about writing a
simple Jupyter Kernel called MyEcho Kernel. As the name suggests,
the kernel will simply return whatever is passed from the Notebook UI. The kernel is
a wrapper kernel over the existing ipykernel
library. More details at writing swapper kernel.
- echo_kernel directory contains the actual python code for starting the kernel python process.
- kernel-spec directory contains the Spec file which will be installed in Jupyter Environment.
- example directory contains a sample notebook which can be used to test the kernel.
You are free to create a new notebook of your choice. Makefile
contains the handy commands which will to setup and test this project.setup.py
is a standard setup file for installing the project.requirements.yml
is a standard conda requirements file which contains the python dependencies that are needed.
- git clone this repository:
git clone git@github.com:rahul26goyal/jupyter-echo-kernel.git
cd jupyter-echo-kernel
This is option 1 where we start fresh from creating a conda environment and installing
all the libraries required to test this kernel on a Classic Jupyter Notebook UI.
- Create a conda env:
make env
- Activate the env:
make activate-env
orconda activate learning_echo_kernel
- Install the kernel library to environment.
make dev-install
- Install the kernel Spec to environment:
make install-echo-kernel-spec
- Verify the kernel spec is available :
jupyter-kernelspec list
- Install Classic Jupyter notebook:
pip instal notebook==6.4.6
- Start Jupyter Notebook serve:
jupyter notebook --debug
This is option 2.
- Lets assume you have a different conda env
jupyter_notebook
where notebook run - active the conda env:
conda acivate jupyter_notebook
- install this Echo kernel to the same env:
make dev-install
- install the kernel-spec to the jupyter env:
make install-echo-kernel-spec
# verify the kernel is installed.
jupyter-kernelspec list
- start jupyter notebook :
jupyter notebook --debug
- create a notebook by selecting "MyEchoKernel" or open the notebook present in the
example/
folder.
Thank you reading this! If you have any feedback or suggestion, feel free to raise an issue.