Developing extensions

JupyterLab extensions are valid npm packages written in JavaScript or TypeScript (a superset of JavaScript aimed at large applications). While all extensions are installed in the same manner, JupyterLab distinguishes between three different types of extensions:

  • Theme extensions, which add a new color scheme
  • Mime renderers, which render file types inside the application
  • Application extensions, the most general extension that extends the functionality of the application
Note that other types of extensions (kernel and server) are possible but not covered here. Mime renderers and theme renderers are made for convenience and are a subset of application extensions.

The JupyterLab site provides the complete process for developing a sample picture of the day extension: https://jupyterlab.readthedocs.io/en/stable/developer/extension_tutorial.html.

The main steps include the following:

  1. Setting up your development environment
  2. Creating an extension project
  3. Adding a widget (or theme or mime handler, depending on the type of extension)
  4. Fine-tuning
  5. Publishing

Development, in general, is an iterative process with lots of trial and error. It is good practice to use a version control system such as Git or Mercurial. Sites such as GitHub, GitLab, and Bitbucket offer free repository hosting and a way to share code.

This tutorial is intended to help you develop a JupyterLab extension and as such, instructions on using source control will not be covered. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.102.124