bokeh server with aiohttp

I’m wondering if anyone has embedded a bokeh server in their aiohttp application? I am currently doing it like this and it seems to be working but I’m wondering if there any issues with this approach –

tornado_type_loop = AsyncIOMainLoop()
import asyncio
tornado_type_loop.install()

from aiohttp import web

asyncio_type_loop = asyncio.get_event_loop()

app = web.Application(loop= asyncio_type_loop, debug=False)

bokeh_server = Server({’/bkapp’: bokeh_app}, io_loop=tornado_type_loop)
bokeh_server.start()

web.run_app(app, host=‘127.0.0.1’, port=8080)

Hi,

So I don't actually have any personal experience with aiohttp so I can't really comment specifically. But offhand this seems like it might be useful to other users, so I'd encourage you to contribute a new example under `examples/howto/server_embed` and/or a small sphinx docs PR.

Thanks,

Bryan

···

On Jun 10, 2017, at 15:36, [email protected] wrote:

I'm wondering if anyone has embedded a bokeh server in their aiohttp application? I am currently doing it like this and it seems to be working but I'm wondering if there any issues with this approach --

tornado_type_loop = AsyncIOMainLoop()
import asyncio
tornado_type_loop.install()

from aiohttp import web

asyncio_type_loop = asyncio.get_event_loop()

app = web.Application(loop= asyncio_type_loop, debug=False)

bokeh_server = Server({'/bkapp': bokeh_app}, io_loop=tornado_type_loop)
bokeh_server.start()

web.run_app(app, host='127.0.0.1', port=8080)

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/cf8e4686-fba7-47fa-a3cb-2fc4b81532c6%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.