Skip to main content

Command line wrapper to run a Bokeh script/folder at the root URL

Project description

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.

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.

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

bokeh-root-cmd-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

bokeh_root_cmd-0.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file bokeh-root-cmd-0.1.1.tar.gz.

File metadata

  • Download URL: bokeh-root-cmd-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for bokeh-root-cmd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5dedf4b90565b40af5ba9fbaccdd061f1fc57239c1e5f9ec3f2351bf5e9a0f8d
MD5 69247652d8ba9f00180b2921d46f5811
BLAKE2b-256 cb994d796aedac83a71b1bfbceb01ca6856d0f942600cdb8fb0f8821806c1b4f

See more details on using hashes here.

File details

Details for the file bokeh_root_cmd-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bokeh_root_cmd-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for bokeh_root_cmd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdca95159d2937600e25b28275d70a12fc7ee279b39cf895b7383f13c1725ca3
MD5 c3c74eb39bd7685588bdf2e5c542ce18
BLAKE2b-256 00e66c0af69fe2850fcd3e603a48bcefe1bd87655fd0808dc329fa788d88ec5e

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