Skip to content

Migrate bundler mini-API from jupyter-incubater/contentmanagement to notebook #1469

@parente

Description

@parente

Testing the waters here to see if I take the time to migrate all or part of the bundler ability out of the incubator project into a PR against notebook if it will past muster for inclusion.

Current implementation doc

https://github.com/jupyter-incubator/contentmanagement#write-bundlers

Use case

As a notebook user, I want to extend the available options under the File menu for transforming and/or packaging a notebook for download or deployment.

Problem

  1. The options under File -> Download As is fixed on both the server and client.
  2. As an extension author, I have to implement both a server extension and a client extension to add one or more options.

Solution already implemented in the incubator

  1. Provide a reusable REST resource on the server that takes a bundler name, the name of a notebook, and invokes a well-defined API (function) in the named bundler's Python module).
  2. Provide a Jupyter nbextension and config-based mechanism for registering bundlers from the jupyter command line.
  3. Provide a resuable JS module that creates bundler entries under Download As or Deploy As in the notebook File menu based on the registered bundler metadata, and makes the appropriate XHR calls to the server-side bundler resource.

Note

This feature is used heavily in the dashboards projects (e.g., by https://github.com/jupyter-incubator/dashboards_bundler) but has applicability beyond dashboards (e.g., bundle notebook-associated local files in a zip for download, https://github.com/jupyter-incubator/kernel_gateway_bundlers).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions