Skip to main content

JupyterHub Apps

Project description

JupyterHub Apps Launcher

Lint Test

JupyterHub Apps Launcher is a generalized server launcher. The goal of this project is to support launching anything like say a Flask Server, FastAPI server or a Panel Dashboard via a user supplied command. Currently, the following frameworks are supported:

  • Panel
  • Bokeh
  • Streamlit
  • Plotly Dash
  • Voila
  • Gradio
  • JupyterLab
  • Generic Python Command

JHub Apps Demo

Install Dependencies

conda env create -f environment-dev.yml
pip install -e .

Starting JupyterHub

Set the following environment variable:

export JWT_SECRET_KEY=$(openssl rand -hex 32)
jupyterhub -f jupyterhub_config.py

Now go to http://127.0.0.1:8000/services/japps/ to access JHub Apps Launcher

API Endpoints

The Hub service is exposed via FastAPI endpoints. The documentation for the same can be accessed at: http://127.0.0.1:8000/services/japps/docs

To try out authenticated endpoints click on the Authorize button on the top right of the above url and chose OAuth2AuthorizationCodeBearer and click on Authorize.

Running Tests

Unit Tests

pytest jhub_apps/tests

E2E Tests

pytest jhub_apps/tests_e2e -vvv -s --headed

Usage

JHub Apps has been tested with local JupyterHub using SimpleLocalProcessSpawner and with The Littlest JupyterHub using SystemdSpawner.

  • Install JHub Apps
pip install git+https://github.com/nebari-dev/jhub-apps.git
  • Add the following in The Littlest JupyterHub's jupyterhub_config.py
from tljh.user_creating_spawner import UserCreatingSpawner
from jhub_apps.configuration import install_jhub_apps

c.JupyterHub.bind_url = "<YOUR_JUPYTERHUB_URL>"
c.SystemdSpawner.unit_name_template = 'jupyter-{USERNAME}{JHUBSERVERNAME}'
c.JAppsConfig.apps_auth_type = "oauth" # or none (if you don't want authentication on apps)
c.JAppsConfig.python_exec = "python3"
# Pass in the path to jupyterhub config
c.JAppsConfig.jupyterhub_config_path = "jupyterhub_config.py"
# Either a static list of conda environments to show in the
# create panel apps form or a callable to fetch conda enviornments
# dynamically, e.g. from conda-store API
c.JAppsConfig.conda_envs = []
c = install_jhub_apps(c, UserCreatingSpawner)

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

jhub_apps-0.1.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

jhub_apps-0.1-py3-none-any.whl (150.5 kB view details)

Uploaded Python 3

File details

Details for the file jhub_apps-0.1.tar.gz.

File metadata

  • Download URL: jhub_apps-0.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for jhub_apps-0.1.tar.gz
Algorithm Hash digest
SHA256 c089faac15b8805cfc43f319c329d29091750306665f6713696c4c302659c998
MD5 47aa46699f3a8eb6fe1e52dd47dbf687
BLAKE2b-256 2b55ae3d1fdedafcdccee9f12486a84f7f2630cc7b93772bc0a157c351be0dd0

See more details on using hashes here.

Provenance

File details

Details for the file jhub_apps-0.1-py3-none-any.whl.

File metadata

  • Download URL: jhub_apps-0.1-py3-none-any.whl
  • Upload date:
  • Size: 150.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for jhub_apps-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d2aeecd7acf53d87c439ce03d480c8d53c479f2de6300c4872d0ee2bf69eee5
MD5 c224a1e9feeed41d44be062d4596e262
BLAKE2b-256 0b32cf81b7c1f438cc090773b5fc33f1332280b24a48db7f5fa9b6f004906c69

See more details on using hashes here.

Provenance

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