Skip to main content

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 UI extensions (nbextensions) for NBClassic only. The server extension was migrated to jupyterlab_nbgallery To install with pip:

pip install jupyter_nbgallery

As of version 2.0, the minimal set of extensions required for nbgallery integration will be automatically installed and enabled. This includes the post_hack server extension, the nbgallery environment registration UI extension, and the Gallery menu UI extension.

To enable the optional extensions:

# Enable all extensions
jupyter nbclassic-extension enable --sys-prefix --py jupyter_nbgallery

# Enable individual extensions
jupyter nbclassic-extension enable --sys-prefix --section tree jupyter_nbgallery/autodownload/autodownload
jupyter nbclassic-extension enable --sys-prefix --section notebook jupyter_nbgallery/easy_buttons/easy_buttons
jupyter nbclassic-extension enable --sys-prefix --section notebook jupyter_nbgallery/instrumentation/instrumentation

Jupyter configuration

Once the extension is installed, you will also need to modify your Jupyter configuration to interact with your nbgallery server.

First, your Jupyter instance needs to know about your nbgallery server in order to save notebooks, download preferences, etc. This is configured in nbconfig/common.json underneath one of Jupyter's configuration directories. You can use the included jupyter nbgallery script to set the location of your nbgallery, as well as the Jupyter client name that will appear in nbgallery's "Run in Jupyter" Environments page.

# Set nbgallery server location:
# jupyter nbgallery [--user|--system|--sys-prefix] configure url <nbgallery server address>
# Example:
jupyter nbgallery --sys-prefix configure url http://localhost:3000

# Set nbgallery environment client name
# Example:
jupyter nbgallery --sys-prefix configure client.name my-jupyter-instance

After configuration, nbconfig/common.json should look something like this (potentially with other unrelated sections):

{
  "nbgallery": {
    "url": "http://localhost:3000",
    "client": {
      "name": "my-jupyter-instance"
    }
  }
}

Second, in order for nbgallery's "Run in Jupyter" button to work, Jupyter must be configured to allow cross-site AJAX. Note these are security-relevant configuration settings. These can be set in jupyter_notebook_config.py:

c.NotebookApp.allow_origin = <URL of your nbgallery instance>`
c.NotebookApp.allow_credentials = True
c.NotebookApp.disable_check_xsrf = True

These can also be set on the command line when launching Jupyter; for example:

jupyter notebook --NotebookApp.allow_origin='http://localhost:3000' --NotebookApp.allow_credentials=True --NotebookApp.disable_check_xsrf=True

If you are launching jupyter lab instead of jupyter notebook, be aware that as of Lab 3.0, these are now ServerApp settings that can be set in jupyter_server_config.py (see the migration guide).

List of 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

Metadata

Release files for jupyter-nbgallery 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyter-nbgallery 3.0.1
File Size Uploaded
jupyter_nbgallery-3.0.1.tar.gz 79.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-nbgallery 3.0.1
File Interpreter ABI Platform
jupyter_nbgallery-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 238.2 kB

Release files / jupyter_nbgallery-3.0.1.tar.gz

Download URL jupyter_nbgallery-3.0.1.tar.gz
Size 79.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2033399ee0e6d6675844ccfac87fc282b5352c6c83da98e29400195550a3f46f
BLAKE2b-256 checksum
How to use checksums
e3bbd8801b003557f5021d6426a5b65e17782f61f0c56709cd4aeee1758087c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.21

Release files / jupyter_nbgallery-3.0.1-py3-none-any.whl

Download URL jupyter_nbgallery-3.0.1-py3-none-any.whl
Size 158.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18581d1e1d1f9c6975a3fe3912cb2ab7483c3ae5d8ee25a57d127cbf817305f3
BLAKE2b-256 checksum
How to use checksums
62b0af02d99dfda64e5b99cf2ac2517f77d5f3fbf7b9c2547cba54ab01746441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.21

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page