Skip to main content

bokeh-root-cmd

Command line wrapper to run one or more named Bokeh/Panel scripts/folders as root URL.

This project is used in ContainDS Dashboards, which is a user-friendly way to launch Jupyter notebooks as shareable dashboards inside JupyterHub. Also works with Bokeh, Dash, Panel, Streamlit and other visualization frameworks.

The published PyPI/Conda packages DO NOT bring in Bokeh or Panel as explicit dependencies, so you may need to install those separately in your environment.

Install and Run

Install using pip.

pip install bokeh-root-cmd

The file to start is specified on the command line, for example:

bokeh-root-cmd ~/Dev/mybokehscript.py

By default the server will listen on port 8888. To specify a different port, use the --port flag.

bokeh-root-cmd --port=8888 ~/Dev/mybokehscript.py

To use the Panel server use the --server flag.

bokeh-root-cmd --server=panel ~/Dev/mybokehscript.py

To run directly in python: python -m bokeh_root_cmd.main <rest of command line>

Other command line args

--allow-websocket-origin

--debug

--ip

Tests

In order to be able to test manually you would need to pip install panel pytest. This will also install bokeh.

Automated Tests

pytest tests.py

Single File on Bokeh Server

Run bokeh-root-cmd test_apps/test_bokeh_hello.py and verify the app is running at http://localhost:8888.

Single File on Panel Server

Run bokeh-root-cmd --server=panel test_apps/test_panel_hello.py and verify the app is running at http://localhost:8888.

Multiple Files on Bokeh Server

Run bokeh-root-cmd test_apps/*.py and verify the app index is running at http://localhost:8888 and test apps at http://localhost:8888/test_bokeh_hello and http://localhost:8888/test_panel_hello.

Multiple Files on Panel Server

Run bokeh-root-cmd --server=panel test_apps/*.py and verify the app index is running at http://localhost:8888 and test apps at http://localhost:8888/test_bokeh_hello and http://localhost:8888/test_panel_hello. Note that no `ready-check' app is included in the index list.

You can also specify them individually

Run bokeh-root-cmd --server=panel test_apps/test_bokeh_hello.py test_apps/test_panel_hello.py and verify the app index is running at http://localhost:8888 and test apps at http://localhost:8888/test_bokeh_hello and http://localhost:8888/test_panel_hello. Note that no `ready-check' app is included in the index list.

Thank you to MarcSkovMadsen for contributions.

Changelog

0.1.2 - Fix for Panel root dashboard when serving multiple apps. Previously caused problems in some browsers.

Metadata

Release files for bokeh-root-cmd 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bokeh-root-cmd 0.1.2
File Size Uploaded
bokeh-root-cmd-0.1.2.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bokeh-root-cmd 0.1.2
File Interpreter ABI Platform
bokeh_root_cmd-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / bokeh-root-cmd-0.1.2.tar.gz

Download URL bokeh-root-cmd-0.1.2.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
19641bc12ba9fb8af34e563c89d20bcb922f6f228b0b825278d81e74313c55da
BLAKE2b-256 checksum
How to use checksums
3c6848e816998b44074bee3cd60dce29020549dc8d4bd3f5f031f613da74c0ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.10

Release files / bokeh_root_cmd-0.1.2-py3-none-any.whl

Download URL bokeh_root_cmd-0.1.2-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
823030110f322c8a4abb99a9d002cdcb09f30175d4dd0f27a90ce92731c03510
BLAKE2b-256 checksum
How to use checksums
9260aec8c2f63f49a5e3064362d31d37c0ab2a43b0dc3e093e11ca0034f4cf49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page