☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

bokeh server with aiohttp

Community Support
Steven_Van_Buskirk
Steven_Van_Buskirk

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)

⌁   Link to post
Bryan
Bryan

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, stevievb@gmail.com 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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
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\.

⌁   Link to post

End of archived discussion · Replies are disabled