Notebook-shim is a Python library that provides a compatibility layer for applications transitioning from `jupyter/notebook` to `jupyter/jupyter_server` as their backend. It specifically helps handle traits and configuration that moved between these two core Jupyter components. The current version is 0.2.4, and it is released on an as-needed basis to support the evolution of the Jupyter ecosystem.
pip install notebook-shimVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the primary use case of `notebook-shim`: integrating `NotebookConfigShimMixin` into an application that now extends `jupyter_server.serverapp.ServerApp` instead of the legacy `notebook.notebookapp.NotebookApp`.
Ensure `notebook-shim` is installed (e.g., `pip install notebook-shim`). Then, import `NotebookConfigShimMixin` from its specific submodule, typically `from notebook_shim.notebook.mixins import NotebookConfigShimMixin`, and include it in your application's inheritance list: `class MyExtension(NotebookConfigShimMixin, ServerApp):`.
Refer to the `jupyter_server` documentation for best practices on developing extensions and applications natively against `jupyter_server`.
Monitor the `jupyter/notebook_shim` and `jupyter/jupyter_server` GitHub repositories for updates on extension path discovery mechanisms and adapt your extension registration accordingly.
Ensure `notebook_shim` is installed and updated to at least version 0.2.0 or higher. For example: `pip install 'notebook-shim>=0.2.0'`.