JupyterLab can be extended in two ways: via top level application plugins or document widget extensions. Application plugins extend the functionality of JupyterLab itself and are the focus of this tutorial. Document widget extensions extend the functionality of document widgets added to the application and are covered in the Documents tutorial.
A JupyterLab application is comprised of Services and Extensions, as well as a core Application object.
A full example is contained here.
A service provider is used by extensions to add functionality to the application.
The default services providers in the JupyterLab application include:
jupyter-js-services
.display_data
renderers.Extensions use the Application object and optionally other services to provide functionality to the application.
The default extensions in the application include:
The command palette is a part of the application object and is intended to be the primary way to display and execute commands in the application. Many of the default extensions add commands to the command palette for actions such as executing a cell on a notebook or launching a new terminal instance.
Phosphor is used as the underlying architecture of JupyterLab and provides many of the low level primitives and widget structure used in the application. It provides a rich set of widgets for developing desktop-like applications in the browser, as well as patterns and objects for writing clean, well-abstracted code. The widgets in the application are primarily Phosphor widgets, and Phosphor concepts like message passing and signals are used throughout. Phosphor messages are a many-to-one interaction that allows information like resize events to flow through the widget heirarchy in the application. Phosphor signals are a one-to-many interaction that allow listeners to react to changes in an observed object.