Jupyter extension to serve bokeh resources (js and css files).
Project description
bokeh-resources
Bokeh (https://bokeh.org/) Python plotting library has two main modes for serving static content: CDN and inline.
-
'cdn' (=content distribution network) mode needs internet connection every time you open the notebook
-
'inline' mode increases the size of ipynb files by 6Mb
bokeh-resources
is a jupyter extension that makes jupyter serve bokeh files locally.
It keeps the size of ipynb files small and works offline as well.
Installation:
pip install bokeh-resources
python -m bokeh-resources.install
Or alternatively
git clone https://github.com/axil/bokeh-resources
cd bokeh_resources
python install.py
This will install the extension to jupyter and to create the symlink (see 'Updating' below)
After this the package itself can be safely uninstalled (pip uninstall bokeh-resources
).
To uninstall the extension run
jupyter nbextensions uninstall bokeh_resources
Usage:
In bokehlab:
%bokehlab local
In bokeh:
from bokeh.io import output_notebook
from bokeh.resources import Resources
output_notebook(Resources('server', root_url='/nbextensions/bokeh_resources'))
Updating:
Serving is performed through a symbolic link (or a directory junction on Windows).
This means that it is resilient to bokeh updates.
(= the extension does not need to be updated when bokeh
is updated to the next version).
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
Built Distribution
File details
Details for the file bokeh-resources-0.2.tar.gz
.
File metadata
- Download URL: bokeh-resources-0.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/59.6.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7624cba4ef5464023645b2c975388760e25f5bc4e9ffc93febef13c559378ad3 |
|
MD5 | 324ea10d9f1c528f3a64f3ce39339364 |
|
BLAKE2b-256 | d3a142c39a63b2c386e5979ec00a9f52a404d55910ad2849bf95ca4da5be1493 |
Provenance
File details
Details for the file bokeh_resources-0.2-py3-none-any.whl
.
File metadata
- Download URL: bokeh_resources-0.2-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/59.6.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c29deda2aa94bebe66bb5163537f333202bb2831bb855d1b26a2cc920630c94b |
|
MD5 | fdb97fff9d949cce72b51a4f47d4e4c9 |
|
BLAKE2b-256 | 5da57ce230b02aa6d6ca9f6616d8c5cfbf3dd6784a4ab6f4e35b7242ba00055a |