Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Latest commit

 

History

History
99 lines (61 loc) · 2.35 KB

README.md

File metadata and controls

99 lines (61 loc) · 2.35 KB

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