Skip to main content

Quickstart

In this tutorial, you'll learn how to set up and start using the Pieces for Developers JupyterLab Extension. We'll cover the installation process and basic usage to help you get up and running quickly.

Install from PyPIInstall from PyPI

Prerequisites

info

In order to use the Pieces JupyterLab Extension, you must have Pieces OS. We also recommend downloading the Pieces for Developers Desktop App.

Steps

Step 1: Install the Pieces JupyterLab Extension in your current environment

  1. Make sure JupyterLab is running:

    jupyter lab
  2. Install the extension:

    1. If you want to use the JupyterLab UI to install, select the Extension Manager, search for Pieces, then select Install for the jupyter-pieces extension.

    2. You can also run the following command from a console or a notebook:

      pip install jupyter-pieces
  3. Once installed, refresh the page in your browser.

Step 2: Use the Pieces JupyterLab Extension

  1. Either create a new notebook and add code to a cell, or open an existing notebook that contains code cells.

  2. Use the embedded Pieces button to save the contents of this cell to Pieces.

    Example of saving an active cell using the embedded buttons

  3. View the saved snippet by selecting the Pieces View from the Ribbon Menu.

    Example of searching for and inserting snippets

  4. From your code cell, select all the code, right click and select Ask Pieces about your selection.

  5. Ask Pieces to explain this code. You will see an explanation of your code in the Copilot chat pane of the Pieces View.

Congratulations! You have successfully set up and started using the Pieces for Developers JupyterLab Extension.

Next Steps

Explore more features to streamline your workflow and boost productivity.