Some spawners allow shell-style expansion here, allowing you to use environment variables. This is usually set if you want to start the single-user server in a different pythonĮnvironment (with virtualenv/conda) than JupyterHub itself. Other than this path, should be provided via args. Provide either a string or a list containing the path to the startup script command. The command used for starting the single-user server. auth_state_hook = userdata_hook cmd c.Spawner.cmd = Command() ¶ Or all of that information to your spawner.ĭef userdata_hook ( spawner, auth_state ): spawner. The auth_state dictionary may be set by the. To the spawner after it has been initialized but before it starts. Consult the documentation for your spawner to verify! auth_state_hook c.th_state_hook = Any(None) ¶Īn optional hook function that you can implement to pass auth_state Some spawners allow shell-style expansion here, allowing you to use environment variables here. args c.Spawner.args = List() ¶Įxtra arguments to be passed to the single-user server. If there are 20 JupyterHub users, there will be 20
Subclass this, and override the following methods:Īs JupyterHub supports multiple users, an instance of the Spawner subclass Spawner ( ** kwargs ) ¶īase class for spawning single-user notebook servers. Contains base Spawner class & default implementation Spawner ¶ class jupyterhub.spawner.