Jupyter magic commands for configuring Dash apps on nanoHUB
Project description
nanohub-dash
Tools for running Dash applications on nanoHUB.
Documentation
Full documentation is available at https://nanohub-dash.readthedocs.io
Installation
pip install nanohub-dash
Features
- Jupyter Magic Command (
%set_dash_env): Configure environment variables for Dash apps directly in Jupyter notebooks - Command-line Tool (
start_dash): Launch Dash applications with automatic proxy configuration and header injection
Quick Start
Jupyter Notebook
%load_ext nanohubdash
%set_dash_env
import os
from dash import Dash, html
app = Dash(__name__,
routes_pathname_prefix=os.getenv("DASH_ROUTES_PATHNAME_PREFIX"),
requests_pathname_prefix=os.getenv("DASH_REQUESTS_PATHNAME_PREFIX")
)
app.layout = html.Div("Hello nanoHUB!")
if __name__ == "__main__":
app.run(
jupyter_server_url=os.environ.get("DASH_BASE_PROXY"),
host=os.environ.get("DASH_HOST", "0.0.0.0"),
port=os.environ.get("DASH_PORT", "8001"),
)
Command Line
start_dash --app myapp.py
Environment Variables
The magic command sets the following environment variables:
DASH_REQUESTS_PATHNAME_PREFIX- The proxy path prefix for Dash requestsDASH_ROUTES_PATHNAME_PREFIX- Set to/DASH_HOST- The bind host for DashDASH_PORT- The port for DashDASH_BASE_PROXY- The proxy URL (https://proxy.<hub_host>)
Requirements
- Python >= 3.8
- IPython >= 7.0
- Must be running on a nanoHUB environment with
SESSIONandSESSIONDIRenvironment variables set
License
MIT License - Copyright 2026 HUBzero Foundation, LLC.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nanohub_dash-0.1.2.tar.gz
(11.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nanohub_dash-0.1.2.tar.gz.
File metadata
- Download URL: nanohub_dash-0.1.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d4c035cc4f7941eb03ba15760a120318d5878ff9cef7afe3bba2ad5f31264db
|
|
| MD5 |
bf322a327222cd664b2afc4b9af36722
|
|
| BLAKE2b-256 |
a80861f52d8e23eb370c1410cca5af462fd5ea733ef4e4642f3d9450132c1fe6
|
File details
Details for the file nanohub_dash-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nanohub_dash-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5696ff3030e6a4a3ffcc9fca186363e741d460420561635051fd7715013271ef
|
|
| MD5 |
398b08ac94b6cb1f726bac77673229ee
|
|
| BLAKE2b-256 |
6547396e4f046210200f2d0d69a8e042f9aac38a645ac8e22f93bd18a932b5bc
|