Skip to main content

Shared libraries for JupyterLab extensions

Project description

Common frontend components, server extension, and packages for GCP JupyterLab extensions

Common package for shared frontend components and Python server modules to be used across JupyterLab extensions.

Features

This module exposes two routes:

  1. /gcp/v1/metadata - A subset of the GCE VM Metadata with AI Platform Notebook-specific keys pulled to the top-level to identify the ML framework installed on the machine.
  2. /gcp/v1/proxy - A proxy-endpoint that accepts a base64-encoded Google API endpoint as a path and forwards the request to the decoded API service method. This is provided so that frontend code can issue API requests to the JupyterLab server, which will attach its machine credential to the request before forwarding it to the API service. This avoids the problem of requring end-user authentication at the UI, or passing the machine credential to the browser which is not supported.

Development

Follow the instructions from the root of the repository.

Install this package in editable mode by cd-ing into this directory and running the ../dev-install.sh script.

When developing locally, in order to access a metadata server running on GCE VM, you will need to issue the following command to set up port forwarding. This will allow requests made locally to port 8889 to be forwarded to a real GCE metadata server. Do this in another terminal window since it will create an interactive SSH session.

gcloud compute ssh ${INSTANCE} --ssh-flag "-L 8889:metadata.google.internal:80"

Set the METADATA_SERVER environment variable to tell the server to use the forwarded address

export METADATA_SERVER="http://localhost:8889"

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

gcp_jupyterlab_shared-1.1.2.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file gcp_jupyterlab_shared-1.1.2.tar.gz.

File metadata

  • Download URL: gcp_jupyterlab_shared-1.1.2.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3

File hashes

Hashes for gcp_jupyterlab_shared-1.1.2.tar.gz
Algorithm Hash digest
SHA256 1f3c5695883b497b6ad9cf550cbf15fa71ef7c7c0cfb0a3c0972b039328f5a57
MD5 7eba1d119c76016062bd1332016d3004
BLAKE2b-256 d687d31ccb8d32735502a910ca7ab84d4afc742887d8a72a6bd16e8ee29e332f

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