Skip to main content

Jupyter extensions to add nbgallery integration

Project description

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Overview

This package provides several Jupyter extensions to enable integration with nbgallery. More information is available here in the nbgallery github project.

Installation

This package contains both UI extensions (nbextensions) and server extensions. Install the package with pip, then install the nbextensions with jupyter. Depending on how you have Jupyter installed, you may want to add the --sys-prefix or --user options; see jupyter nbextension install --help for details.

pip install jupyter_nbgallery
jupyter nbextension install --py jupyter_nbgallery

Next, enable the extensions you want to use. At a minimum, you need the post_hack server extension and the gallery_menu and environment nbextensions to enable the two-way integration with nbgallery.

To enable all extensions:

jupyter serverextension enable --py jupyter_nbgallery
jupyter nbextension enable --py jupyter_nbgallery

To enable extensions independently (note that you need to specify the section for nbextensions):

# Minimal set
jupyter nbextenstion enable --section common jupyter_nbgallery/environment/environment
jupyter nbextenstion enable --section notebook jupyter_nbgallery/gallery_menu/gallery_menu
jupyter serverextension enable jupyter_nbgallery.post_hack

# Optional
jupyter nbextenstion enable --section tree jupyter_nbgallery/autodownload/autodownload
jupyter nbextenstion enable --section notebook jupyter_nbgallery/easy_buttons/easy_buttons
jupyter nbextenstion enable --section notebook jupyter_nbgallery/instrumentation/instrumentation

If you are using the Jupyter Nbextensions Configurator extension, you can also toggle the nbextensions on and off from the configurator page.

Manual configuration

Once the extension is installed, you will also need to modify your Jupyter configuration. The nbconfig/common.json must have an nbgallery section listing the URL of your nbgallery instance, and several options must be set in jupyter_notebook_config.py (or on the command line) to allow cross-site Javascript to work. See these instructions for details.

Extensions

UI Extensions (nbextensions)

Minimal Set

  • environment registers this Jupyter instance with nbgallery so notebooks can be launched with the "Run in Jupyter" button. It also downloads preferences stored in nbgallery.
  • gallery_menu adds the Gallery and Preferences menus to the Notebook interface. These are necessary for saving notebooks and preferences back to nbgallery.

Optional

Server Extensions

  • post_hack is an workaround for browser issues with CORS pre-flight checks when PKI certificates are involved. The Jupyter API enables notebooks to be uploaded via a PUT to /api/contents/NotebookName.ipynb; this extension enables uploads via a POST to /post/NotebookName.ipynb as well. The "Run in Jupyter" button in nbgallery uses the /post endpoint, so this extension must be enabled to launch notebooks from nbgallery.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter-nbgallery-1.0.1.tar.gz (77.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyter_nbgallery-1.0.1-py3-none-any.whl (79.3 kB view details)

Uploaded Python 3

File details

Details for the file jupyter-nbgallery-1.0.1.tar.gz.

File metadata

  • Download URL: jupyter-nbgallery-1.0.1.tar.gz
  • Upload date:
  • Size: 77.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for jupyter-nbgallery-1.0.1.tar.gz
Algorithm Hash digest
SHA256 85fa743f925971558a75009f52df36ca4ae1899fee84f9ae8401060cbd19be70
MD5 7ebf25760675093b67a9b2cede1c5f27
BLAKE2b-256 a66fc892b79a7dd4dae135d4fd579e1934ddda52831c0257277d69506338bf15

See more details on using hashes here.

File details

Details for the file jupyter_nbgallery-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: jupyter_nbgallery-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 79.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for jupyter_nbgallery-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c45e97b203d941ad091c0f55f538b29cbf970f53f9d1d27f9517028fdc9fa64
MD5 e8a15a8dee6cf3a79a00dc89eb775efd
BLAKE2b-256 457ce4c24cd2a122ffa4490dc137e2d1c94365ad72fbdbbfb8dbd6ad0af21728

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page