About Companion Packages

My extension is not a pure frontend extension so I have to write some Python codes. I follow the document and found out companion-packages.

Part of my package.json looks like this

  "jupyterlab": {
    "extension": true,
    "discovery": {
      "server": {
        "base": { "name": "featurize_jupyterlab" },
        "managers": [ "pip" ]
      }
    }
  },

I have already installed the featurize_jupyterlab python package via pip so I think it will be enabled by jupyterlab automatically. Unfortunately, there is nothing happend. Can anybody help me with this? Thanks.

I have found a jupyterlab-extension https://github.com/jupyterlab/jupyterlab-git , the installation of this extension is

jupyter labextension install @jupyterlab/git
pip install --upgrade jupyterlab-git
jupyter serverextension enable --py jupyterlab_git

The installation of the git extension is separated by client side and server side. If we have to do this, then what’s the point of writing the information of the dependency in package.json ?

The intention of that metadata is to hint to the frontend user, who may be using the extension manager, that the extension requires a server component.