The Jupyter Notebook web application provides a graphical interface for creating, opening, renaming, and deleting files in a virtual filesystem. girder_jupyter is a python package that implements a contents manager to allow Girder to become a backend for this virtual filesystem. This allows notebooks and files to be stored in a Girder server from within Jupyter.
Install the package in the Python environment you are running your Jupyter server in:
pip install girder-jupyter
Add the following options to your jupyter_notebook_config.py
c.NotebookApp.contents_manager_class = 'girder_jupyter.contents.manager.GirderContentsManager'
c.GirderContentsManager.api_key = '<api key>'
c.GirderContentsManager.api_url = '<api url>'
Where <api key>
is replaced with a Girder API key for the Girder server and <api url>
is the URL to Girder instance you want
to use for example http://localhost:8080/api/v1.
api_url
- An API URL for the Girder server. Defaults to 'http://localhost:8080/api/v1'api_key
-A Girder API key key for the Girder server atapi_url
. The key should have read and write permission scope.token
- A Girder token for the Girder server atapi_url
. This parameter is particularly useful when running instances from JupyterHub.root
- The root in the Girder hierarchy to use as the content managers root. This path can include{login}
which will be replace with the current users login. Defaults to'user/{login}'
Note that either api_key
or token
must be provided for the contents manager to be able to
authenticate with the Girder server.