jupyterlab_iframe

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

https://dev.azure.com/tpaine154/jupyter/_apis/build/status/timkpaine.jupyterlab_iframe?branchName=masterBuild Status https://img.shields.io/azure-devops/coverage/tpaine154/jupyter/10/masterCoverage https://img.shields.io/github/issues/timkpaine/jupyterlab_iframe.svgGitHub issues https://img.shields.io/pypi/l/jupyterlab_iframe.svgPyPI https://img.shields.io/pypi/v/jupyterlab_iframe.svgPyPI https://img.shields.io/npm/v/jupyterlab_iframe.svgnpm

https://raw.githubusercontent.com/timkpaine/jupyterlab_iframe/master/docs/example1.gif

Install

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

Options

Example

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

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

In this example, list, of, and sites will be available as links in the command palette, and a site will open by default the first time JupyterLab is opened.

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

API Documentation

class jupyterlab_iframe.extension.IFrameHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs)[source]

Bases: notebook.base.handlers.IPythonHandler

get()[source]
initialize(welcome=None, sites=None)[source]
jupyterlab_iframe.extension.load_jupyter_server_extension(nb_server_app)[source]

Called when the extension is loaded.

Parameters:nb_server_app (NotebookWebApplication) – handle to the Notebook webserver instance.
class jupyterlab_iframe.proxy.ProxyHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs)[source]

Bases: notebook.base.handlers.IPythonHandler, tornado_proxy_handlers.handlers.ProxyHandler

get(*args)[source]

Get the login page

initialize(**kwargs)[source]
class jupyterlab_iframe.proxy.ProxyWSHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs)[source]

Bases: tornado_proxy_handlers.handlers.ProxyWSHandler

open(*args)[source]

Invoked when a new WebSocket is opened.

The arguments to open are extracted from the tornado.web.URLSpec regular expression, just like the arguments to tornado.web.RequestHandler.get.

open may be a coroutine. on_message will not be called until open has returned.

Changed in version 5.1: open may be a coroutine.