Skip to main content

IFrame widgets for JupyterLab

Project description

jupyterlab_iframe

Open a site in a widget, or add a set of "quicklinks".

Build Status codecov PyPI PyPI npm Binder

Install

pip install jupyterlab_iframe
jupyter labextension install jupyterlab_iframe
jupyter serverextension enable --py jupyterlab_iframe

Options

External Sites

install the server extension, and add the following to jupyter_notebook_config.py

c.JupyterLabIFrame.iframes = ['list', 'of', 'sites']

In this example, list, of, and sites will be available as links in the command palette.

Landing page on initial page load

c.JupyterLabIFrame.iframes = ['list', 'of', 'sites']
c.JupyterLabIFrame.welcome = 'a site to show on initial load'
c.JupyterLabIFrame.local_files = ['list', 'of', 'local', 'html', 'files']

In this example, a site will open by default the first time JupyterLab is opened.

Open local html file in iframe

c.JupyterLabIFrame.local_files = ['list', 'of', 'local', 'html', 'files']

Any files specified by 'local_files' will be served up as local links. By default any file on the filesystem is allowed, to disable this and only allow the list specifically designated here, set c.JupyterLabIFrame.allow_any_local = False. If you allow all, in the open dialog start the file path with local://.

Caveats

Update for version v0.0.12 - Most of these are covered by #31

This package uses iframes, so is subject to a few restrictions: - If Jlab is served over SSL, so must the sites (http/https must match) - If the underlying site enforces same-origin, then we cannot navigate to them (e.g. google)

Similar Packages

Configuring Binder with a landing page

To configure binder to serve a landing page, simply add the following configuration:

To requirements.txt:

jupyterlab_iframe>=0.2

To postBuild:

jupyter labextension install jupyterlab_iframe@^0.2
jupyter serverextension enable --py jupyterlab_iframe

config="c.JupyterLabIFrame.welcome = 'local://binder/landing.html'"
mkdir -p ~/.jupyter
echo -e $config > ~/.jupyter/jupyter_notebook_config.py

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

jupyterlab_iframe-0.3.2.tar.gz (159.7 kB view details)

Uploaded Source

Built Distribution

jupyterlab_iframe-0.3.2-py2.py3-none-any.whl (30.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jupyterlab_iframe-0.3.2.tar.gz.

File metadata

  • Download URL: jupyterlab_iframe-0.3.2.tar.gz
  • Upload date:
  • Size: 159.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for jupyterlab_iframe-0.3.2.tar.gz
Algorithm Hash digest
SHA256 42a0111064ef31995cce579b2bbace871d22a845bb16bfd159285ea75f8c184e
MD5 3303333094cb657a7e3b1f984672428a
BLAKE2b-256 2fa213af195f2bcaf35457dc2a5600028d2c2fbf82a719bf9c78e520ea99daea

See more details on using hashes here.

File details

Details for the file jupyterlab_iframe-0.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_iframe-0.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for jupyterlab_iframe-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4d8b823b203d921064cfca5ada44c23fb3fa6a5cfb29f6d40a256addc6f16497
MD5 8f1226fd1b2b672474dee4cc866e0c6b
BLAKE2b-256 8005740e33f6493d5ad2692a85b40fe1cdc67256bdc54150d2f13590953f8904

See more details on using hashes here.

Supported by

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