Skip to main content

JupyterLab 3 Simple Extension

Project description

Datalayer

🛡️ Jupyter Auth

Environment

conda deactivate && \
  conda remove -y --all -n jupyter-auth
# Create your conda environment.
conda create -y \
  -n jupyter-auth \
  python=3.8 \
  twine \
  nodejs=14.5.0 \
  yarn=1.22.5 \
  cookiecutter
conda activate jupyter-auth
pip install jupyter_packaging
# Install jupyterlab.
pip install jupyterlab==3.0.4
# ...or alternatively, clone and build jupyterlab from source.
git clone https://github.com/jupyterlab/jupyterlab --depth 1 -b master && \
  cd jupyterlab && \
  pip install -e . && \
  jupyter lab build && \
  cd ..
pip install ipywidgets==7.6.0

Develop

# Build the extension and link for dev in shell 1.
jupyter labextension develop --overwrite
# List extensions.
jupyter labextension list
pip list | grep jupyter-auth
# Run and watch the extension in shell 1.
yarn watch
# Run and watch jupyterlab in shell 2.
# Look at the remote entry javascript, a webpack5 feature.
conda activate jupyter-auth && \
  jupyter lab \
    --watch \
    --ServerApp.token= \
    --ServerApp.jpserver_extensions="{'jupyter_auth': True}" \
    ./examples
# Only if you have build jupyterlab from source.
# Run and watch jupyterlab in shell 2.
# Look at the remote entry javascript, a webpack5 feature.
conda activate jupyter-auth && \
  jupyter lab \
    --watch \
    --dev-mode \
    --ServerApp.token= \
    --ServerApp.jpserver_extensions="{'jupyter_auth': True}" \
    --extensions-in-dev-mode \
    ./examples

Build

# Generate sourcemaps.
jupyter labextension build --development=True .
jupyter lab build --minimize=False
# Do not generate sourcemaps.
jupyter labextension build .
jupyter lab build

Publish

cd jupyter_auth && \
  yarn build:lib && \
  npm publish --access public
cd jupyter_auth && \
  pip install -e . && \
  python setup.py sdist bdist_wheel && \
  twine upload dist/*

Use

conda deactivate && \
  conda remove -y --all -n jupyter-auth-user
# Create your conda environment.
conda create -y \
  -n jupyter-auth-user \
  python=3.8 \
  nodejs=14.5.0
conda activate jupyter-auth-user
pip install --pre jupyterlab==3.0.3
pip install jupyterlab_widgets==1.0.0a6
jupyter labextension list
# Check the Extension Manager.
jupyter lab --notebook-dir=~/notebooks
# https://pypi.org/project/jupyterlab-geojs/#history
pip search "jupyterlab extension"
pip search "JupyterLab3"
pip install @datalayer/jupyter-auth
jupyter labextension list
jupyter lab --notebook-dir=~/notebooks

Credits

This folder contains code taken from following sources:

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

jupyter_auth-0.0.1.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

jupyter_auth-0.0.1-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

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