Question about creating a custom content manager for Jupyter Lab that is bundled with Z2JK

Building a custom content manager for the Jupyter Lab that comes bundled with Zero to Jupyterhub with Kubernetes.

Trying to figure out how to plug this custom content manager into the Jupyter Lab Docker image we are building. Bottom line, want to Jupyter Lab to use the new custom content manager we are building rather than the default content manager that ships with Z2JK.

Read the “notebook” docs that explains how to create a custom content manager. The doc describes a configuration property called “c.NotebookApp.contents_manager_class”.

Question 1: If we import the module containing our custom content manager into the and then set “c.NotebookApp.contents_manager_class” equal to our custom content manager Python class will Jupyter Lab use this custom content manager instead of the default content manager?

Question 2: I do not find a file that comes with Z2JK. I know I can generate a commented-out file. Do I just uncomment the c.NotebookApp.contents_manager_class property, set its value and add an import statement to this file?

Question 3: Do install the file into the <jovyan home directory/.jupyter folder as part of the Jupyter Lab Docker image build process?

Your response is much appreciated.


In general JupyterHub doesn’t care too much how your singleuser server is configured once it’s started, so in most cases you can start by getting it working outside of JupyterHub (i.e. just build your JupyterLab container image).

Do the docs for other contents managers such as GitHub - danielfrg/s3contents: A S3 backed ContentsManager implementation for Jupyter help?

You might need to swap NotebookApp for ServerApp depending on how things are setup.