You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new ExtensionApp class will be available in jupyter_server.extensions.extensionapp. It enables developers to make server extensions behave like standalone Jupyter applications. Jupyterlab is an example of this kind of server extension. It can be configured, initialized, and launched from the command line. When Lab is launched, it first initializes and configures a jupyter (notebook) server, then loads the configured jupyterlab extension and redirects the use to the Lab landing page.
ExtensionApp handles the boilerplate code to make Jupyter applications that configure and launch server extensions directly. It inherits jupyter_core.JupyterApp and exposes a command line entry point: jupyter <extension-name>. When an extension is launched, it first configures and starts a jupyter_server (ServerApp); then, it loads the configured extension and redirects users to the extension's landing page. Extension developers simply inherit the ExtensionApp and add the extension's load_jupyter_server_extension as a staticmethod.
fromjupyter_server.extensionappimportExtensionAppfrom .extensionimportload_jupyter_server_extensionclassMyExtension(ExtensionApp):
name='myextension'description='My server extension as a Jupyter app.'load_jupyter_server_extension=staticmethod(load_jupyter_server_extension)
ExtensionApps can be configured by jupyter_<extension-name>_config.py|json as well. When the server extension is loaded by a server or launched from the command line, it searches the list of jupyter --paths for configured traits in these files.
From JEP 0028 (Jupyter Server):
Opening for further discussion here.
The text was updated successfully, but these errors were encountered: