Allowing a user to specify arguments to their document on Bokeh server

I have a single application I want to host on my local network, and I’d like the application to take arguments from the URL the user provides:

http://serverlocation:5006/application?date=20180102&pizza=2

After rifling through some documentation, I found this:

curdoc().session_context.request.arguments
# {'date': [b'20180102'], 'pizza': [b'2']}

The documentation for this functionality wasn’t very searchable just from the result I was looking for, so I thought I’d post it here.

1 Like

We have example scripts in the examples directory that demonstrate this and may other things. I’ve thought for a long time that it would be good to find a way to automate cross-referencing these examples to the narrative and reference docs. Just getting to a place that let’s you know what the right term or concept is at all is an important step, but then seeing an immediate example of the concept in practice would be even more valuable. Figuring out how to do this would be a great topic for the Development Category, if anyone is interested in helping me find a path forward.