Metadata-Version: 2.1
Name: h2o-nitro-bokeh
Version: 0.2.1
Summary: Bokeh plugin for H2O Nitro
Home-page: https://github.com/h2oai/nitro-bokeh
Author: Prithvi Prabhu
Author-email: prithvi.prabhu@gmail.com
License: UNKNOWN
Project-URL: Documentation, https://github.com/h2oai/nitro-bokeh
Project-URL: Source, https://github.com/h2oai/nitro-bokeh
Project-URL: Issues, https://github.com/h2oai/nitro-bokeh/issues
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Widget Sets
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: bokeh
Requires-Dist: h2o-nitro (>=0.9.2)

# Bokeh plugin for H2O Nitro

This plugin lets you use [Bokeh](https://docs.bokeh.org/en/latest/) visualizations in [Nitro](https://github.com/h2oai/nitro)
apps.

## Demo

[View source](example).

![Demo](demo.gif)

## Install

```
pip install h2o-nitro-bokeh
```

## Usage

1. Import `bokeh_plugin` and `bokeh_box` from `h2o_nitro_bokeh`.
2. Add `bokeh_plugin()` to your Nitro app.
3. Use `bokeh_box(model)` to render Bokeh models (figures, widgets, and so on).


```py 
from bokeh.plotting import figure, show
from h2o_nitro import View, web_directory
from h2o_nitro_bokeh import bokeh_plugin, bokeh_box


def main(view: View):
    view(bokeh_box(make_plot()))


nitro = View(
    main,
    title='Nitro + Bokeh',
    caption='A minimal example',
    plugins=[bokeh_plugin()],  # Include the Bokeh plugin
)

def make_plot():
    x = [1, 2, 3, 4, 5]
    y = [6, 7, 2, 4, 5]
    p = figure(title="Simple line example", x_axis_label="x", y_axis_label="y")
    p.line(x, y, legend_label="Temp.", line_width=2)
    return p

```




