Skip to main content

AI-powered JupyterLab extension to convert Jupyter notebooks into interactive Streamlit, Dash, Solara, and Gradio dashboards with one-click preview

Project description

Auto Dashboards logo Auto Dashboards

AI-powered JupyterLab extension to convert Jupyter notebooks into interactive Streamlit, Dash, and Solara dashboards with one click — preview side-by-side without leaving JupyterLab.

auto-dashboards

New in version 0.3.0: Create Dash dashboards.

New in version 0.2.1: Support for OpenAI-compatible and local LLMs like Ollama!

New in version 0.2.0: Create Solara dashboards.

https://github.com/user-attachments/assets/f7b040e5-a137-454f-bcb2-4c7b46b45288

Features

Supported output formats:

Coming soon:

Requirements

  • JupyterLab >= 4.2
  • OpenAI or OpenAI-compatible LLM
    • For OpenAI:
    export OPENAI_API_KEY="your-api-key"
    
    • For OpenRouter:
    export OPENAI_API_KEY="openrouter-api-key"
    export OPENAI_API_BASE="https://openrouter.ai/api/v1"
    export OPENAI_API_MODEL="openrouter/horizon-beta" # or any other model you have access to
    
    • For local LLMs (like Ollama):
    export OPENAI_API_URL="http://localhost:11434/v1"
    export OPENAI_MODEL="gpt-oss:20b"  # or any other model you have pulled
    

Install

To install the extension, execute:

pip install auto-dashboards

This installs the extension with just the core dependencies. To use dashboard conversion, install one or more framework extras:

# Install with a specific framework
pip install auto-dashboards[streamlit]
pip install auto-dashboards[solara]
pip install auto-dashboards[dash]

# Install with multiple frameworks
pip install auto-dashboards[streamlit,dash]

# Install with all supported frameworks
pip install auto-dashboards[all]

If you installed the core extension without frameworks, you can add them later:

pip install streamlit solara dash

Uninstall

To remove the extension, execute:

pip uninstall auto-dashboards

Troubleshoot

If you are seeing the frontend extension, but it is not working, check that the server extension is enabled:

jupyter server extension list

If the server extension is installed and enabled, but you are not seeing the frontend extension, check the frontend extension is installed:

jupyter labextension list

Dash script authoring

When launching Dash through Auto Dashboards, keep the script as plain Dash. The managed runner loads your script and starts the app for you.

Rules:

  • Use standard Dash app creation (app = Dash(__name__)).
  • Expose either a top-level app or a create_app(...) function that returns a Dash app.
  • Define app.layout as usual.
  • You may keep a local if __name__ == "__main__": app.run() block for direct Python runs.
  • Do not parse --port, --proxy-path, or --no-browser in your script when using Auto Dashboards.
  • Keep the file valid Python with no notebook magics.
from dash import Dash, html

app = Dash(__name__)
app.layout = html.Div("Hello from Dash")

if __name__ == "__main__":
    app.run()

Auto Dashboards injects managed runtime defaults for Jupyter proxy compatibility (port, host, and proxy pathname prefix).

Acknowledgments

This extension is initially based on the Elyra AI Toolkit's Streamlit extension that provides Streamlit execution and preview functionality.

This extension is inspired by the POC from a wonderful BreakThrough AI Team during the Fall 2024 session: @anikaguin, @mpate154, @z3yn3p-alta. Check out their project.

Contributing

Development install

Note: You will need NodeJS to build the extension package.

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

Setup a fresh development environment

We recommend creating a fresh development environment to avoid conflicts with existing installations.

Option 1: Using uv (recommended for faster setup)

Note: Requires Node.js 22 to be installed separately.

# Create a virtual environment with Python 3.13
uv venv --python 3.13

# Install JupyterLab and framework dependencies
uv pip install jupyterlab==4.4.10 streamlit

# Activate the virtual environment
source .venv/bin/activate

Option 2: Using conda

# Create a new conda environment with all dependencies
conda create -n auto-dashboards -c conda-forge python=3.13 jupyterlab=4.4.10 nodejs=22

# Activate the environment
conda activate auto-dashboards

# Install framework dependencies
pip install streamlit

Build and install the extension (applies to any environment):

# Install Node.js dependencies
jlpm install

# Build the extension
jlpm build

# Install package in development mode (use 'uv pip install' for uv or 'pip install' for conda)
pip install -e .

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Server extension must be manually installed in develop mode
jupyter server extension enable auto_dashboards

# Rebuild extension Typescript source after making changes
jlpm build

Start JupyterLab:

jupyter lab

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Cleaning build artifacts

If you encounter build errors or want to rebuild from scratch, clean the build artifacts first:

# WARNING: This removes ALL git-ignored files (like node_modules, .venv, build artifacts)
# Use with caution - make sure you've committed any important work!
git clean -Xdf

# Or clean only specific build outputs
jlpm clean            # Clean TypeScript build outputs
jlpm clean:all        # Complete clean (including labextension)

Then rebuild:

jlpm build

Development uninstall

For uv users:

# Uninstall the package
uv pip uninstall auto-dashboards

# Optionally, remove the virtual environment
deactivate
rm -rf .venv

For conda users:

# Uninstall the package
pip uninstall auto-dashboards

# Optionally, remove the entire environment
conda deactivate
conda env remove -n auto-dashboards

Packaging the extension

See RELEASE

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

auto_dashboards-0.3.1.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto_dashboards-0.3.1-py3-none-any.whl (128.9 kB view details)

Uploaded Python 3

File details

Details for the file auto_dashboards-0.3.1.tar.gz.

File metadata

  • Download URL: auto_dashboards-0.3.1.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for auto_dashboards-0.3.1.tar.gz
Algorithm Hash digest
SHA256 f9f0130cd911edef36e46e9576ef49af5ec58053f4b77b793bd82e6781781344
MD5 e629395fd9bea239f8a8f1dcf48ef920
BLAKE2b-256 5c5eb1621d46b47421c1b9a9ac69d100e6c9cba3edb7bd1e13d86331d6186a1d

See more details on using hashes here.

File details

Details for the file auto_dashboards-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_dashboards-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e83b23c2a56b35df037cd81835b87624676e88ee12079895ca2c05ce196baa76
MD5 f296d9c736aa786c12e92507bf1d3179
BLAKE2b-256 43f2a84adf356f636e2e5a785ad0412b3f8b5b552a6492cf9322e8cd0a884b93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page