Kernelspec installation

Install the python3-unlock Jupyter kernelspec pointing at ipyku_launcher.

Run ipyku-launcher install --user (or --sys-prefix) from the command line, or call install() directly from Python.

install

def install(
    kernel_spec_manager:jupyter_client.kernelspec.KernelSpecManager | None=None, # `KernelSpecManager` instance (created when omitted)
    user:bool=False, # Install into the user's Jupyter data directory?
    kernel_name:str='python3-unlock', # Kernelspec directory name (defaults to `python3-unlock`)
    display_name:str | None=None, # Display name shown in Jupyter clients
    prefix:str | None=None, # Environment prefix to install under (e.g. `sys.prefix`)
    profile:str | None=None, # Optional IPython profile name passed via `--profile`
    env:dict[str, str] | None=None, # Extra environment variables written into `kernel.json`
    frozen_modules:bool=False, # Keep CPython frozen modules enabled instead of `-Xfrozen_modules=off`?
)->str: # Destination path of the installed kernelspec directory

Write and install the ipyku_launcher Jupyter kernelspec, returning its installed path.

InstallUnlockKernelSpecApp

def InstallUnlockKernelSpecApp(
    **kwargs:t.Any
)->None:

CLI subcommand (ipyku-launcher install) that parses flags and delegates to install.

InstallUnlockKernelSpecApp.start

def start()->None:

Parse CLI arguments and install the Unlock kernelspec.