

- #Jupyterlab extension how to#
- #Jupyterlab extension install#
- #Jupyterlab extension update#
- #Jupyterlab extension code#
We provide a set of guides to get started writing extensions for JupyterLab:Įxtension Tutorial: A tutorial to learn how to make a simple JupyterLab extension. Other resources ¶īefore we get started, here are some resources for hands-on practice or more in-depth reference documentation. We will discuss how to write a plugin, then how to package together a set of plugins into a JupyterLab extension. Extensions even provide more fundamental parts of the application, such as the menu system, status bar, and the underlying communication mechanism with the server.Ī JupyterLab extension is a package that contains a number of JupyterLab plugins.
#Jupyterlab extension code#
JupyterLab extensions provide nearly every function in JupyterLab, including notebooks, document editors and viewers, code consoles, terminals, themes, the file browser, contextual help system, debugger, and settings editor. The JupyterLab application is comprised of a core application object and a set of extensions.
#Jupyterlab extension update#
If you make changes to the source code, ensure you update the README and run jlpm embedme from the root of the repository to regenerate the READMEs. We are using embedme to embed code snippets into the markdown READMEs. You can create a conda environment to get startedįrom there, you can change your extension source code, it will be recompiled,Īnd you can refresh your browser to see your changes. These examples are developed and tested on top of JupyterLab. JupyterLab you may find it easier to understand than pure JavaScript if you have aīasic understanding of object oriented programming and types. Writing an extension requires basic knowledge of JavaScript, Typescript and potentially Python.ĭon't be scared of Typescript, even if you never coded in TypeScript before you touch Use Signals to allow Widgets communicate with each others.Īdd a new button to the notebook toolbar.Īdd a new Widget element to the main window. server) and frontend parts.Ĭreate and use new Settings for your extension. Interact with a kernel from an extension.Ĭreate a minimal extension with backend (i.e. Set up the development environment and print to the console. Put widgets at the top of a main JupyterLab area widget.Īdd a new button to an existent context menu.Ĭreate new documents and make them collaborative. Register commands in the Command Palette. You are welcome to open any issue or pull request. Browse the previews below or skip them and jump directly to the sections for developers. We have structured the examples based on the extension points.


Note that the 1.x and 2.x branches are not updated anymore. If you would like to use the examples with JupyterLab 1.x, check out the 1.x branch.

If you would like to use the examples with JupyterLab 2.x, check out the 2.x branch. The examples currently target JupyterLab 3.1 or later. # build the TypeScript source after making changes
#Jupyterlab extension install#
# install your development version of the extension with JupyterLab # go to the hello world example cd hello-world # go to the extension examples folder cd jupyterlab-extension-examplesĬonda activate jupyterlab-extension-examples
