vnijs / jupyter-pgweb-proxy

Jupyter server proxy w/ pgweb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jupyter-pgweb-proxy

This package was built from the illumidesk/cookiecutter-jupyter-server-proxy template.

Requirements

  • Python 3.6+
  • Jupyter Notebook 6.0+
  • JupyterLab 2.1+

This package executes the standard pgweb command. This command assumes the pgweb command is available in the environment's PATH.

What?

Check it out, it's pretty sweet.

Quick Starts

Launch with binder

This test requires you to have a database instance available as a public endpoint or installed within the notebook container itself.

Binder

Run locally with docker-compose

make dev
  1. Open your browser: http://localhost:8889
  2. Click the pgweb item from the New dropdown in Jupyter Classic or click on the green pgweb icon in the Notebooks section in Jupyter Lab.
  3. Connect with the Scheme or Standard option.

For example, with the Scheme option the string would look like so:

postgres://postgres:postgres@testdb:5432/postgres?sslmode=disable

Cleanup

Stop services:

make dev-down

Remove images and running containers:

NOTE: this will stop all running containers on the local, including those with the exit status.

make clean-all

The Hard Way

Create and Activate Environment

virtualenv -p python3 venv
source venv/bin/activate

Install jupyter-pgweb-proxy

pip install git+https://github.com/illumidesk/jupyter-pgweb-proxy.git

Enable jupyter-pgweb-proxy Extensions

  1. For Jupyter Classic, activate the jupyter-server-proxy extension:
jupyter serverextension enable --sys-prefix jupyter_server_proxy
  1. For Jupyter Lab, install the @jupyterlab/server-proxy extension:
jupyter labextension install @jupyterlab/server-proxy
jupyter lab build
  1. Start Jupyter Classic or Jupyter Lab

  2. Click on the pgweb icon from the Jupyter Lab Launcher or the pgweb item from the New dropdown in Jupyter Classic.

  3. Connect to your database as instructed in the Quickstart section.

Credits

License

BSD 3-Clause

About

Jupyter server proxy w/ pgweb

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 67.9%Language:Makefile 23.4%Language:Dockerfile 8.7%