bokeh.client.util

Internal utility functions used by bokeh.client

server_url_for_websocket_url(url)[source]

Convert an ws(s) URL for a Bokeh server into the appropriate http(s) URL for the websocket endpoint.

Parameters:url (str) – An ws(s) URL ending in /ws
Returns:The corresponding http(s) URL.
Return type:str
Raises:ValueError – If the input URL is not of the proper form.
websocket_url_for_server_url(url)[source]

Convert an http(s) URL for a Bokeh server websocket endpoint into the appropriate ws(s) URL

Parameters:url (str) – An http(s) URL
Returns:The corresponding ws(s) URL ending in /ws
Return type:str
Raises:ValueError – If the input URL is not of the proper form.