Any plans to wrap a nice way to embed a bokeh server in an app? I’d like to use it as a single-user dashboard for some apps I’m writing.
I’m looking for a programmatic way to start up a bokeh server and serve a ‘static’ (but not really, because it’s updating via callbacks) plot or three.
I tried doing:
def bokeh_serve(doc, **server_kwargs):
from bokeh.server.server import Server
from bokeh.application import Application
from bokeh.application.handlers import FunctionHandler
applications = { ‘/’ : Application(FunctionHandler(lambda x: doc)) }
server = Server(applications, **server_kwargs)
server.start()
and then
bokeh_serve(curdoc(), port=8888)
…but no joy (page loads but stays blank, no matter what I’ve set curdoc() to). Plus, I’m sure the above uses a bunch of meant-for-internal-use-only APIs, so it’s probably won’t survive a version rev.
Thanks for any help!
–pj

