Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JEP 0028] Server extensions as Applications #32

Closed
Zsailer opened this issue Feb 28, 2019 · 1 comment
Closed

[JEP 0028] Server extensions as Applications #32

Zsailer opened this issue Feb 28, 2019 · 1 comment

Comments

@Zsailer
Copy link
Member

Zsailer commented Feb 28, 2019

From JEP 0028 (Jupyter Server):

Extensions as Applications

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.

from jupyter_server.extensionapp import ExtensionApp
from .extension import load_jupyter_server_extension

class MyExtension(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.

Initial experimental work resides in jupyter_server_extension.

Opening for further discussion here.

@Zsailer Zsailer changed the title [JEP 10] [JEP 10] Server extensions as Applications Feb 28, 2019
@Zsailer Zsailer changed the title [JEP 10] Server extensions as Applications [JEP 0028] Server extensions as Applications Mar 1, 2019
@Zsailer
Copy link
Member Author

Zsailer commented Oct 31, 2023

Closing since this work has already been implemented.

@Zsailer Zsailer closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant