bokeh.client.util#

内部实用函数,由bokeh.client使用

server_url_for_websocket_url(url: str) str[source]#

将Bokeh服务器的ws(s) URL转换为Websocket端点的适当http(s) URL。

Parameters:

url (str) – 一个以 /ws 结尾的 ws(s) URL

Returns:

对应的 http(s) URL。

Return type:

str

Raises:

ValueError – 如果输入的URL格式不正确。

websocket_url_for_server_url(url: str) str[源代码]#

将Bokeh服务器Websocket端点的http(s) URL转换为适当的ws(s) URL

Parameters:

url (str) – 一个 http(s) URL

Returns:

对应的 ws(s) URL 以 /ws 结尾

Return type:

str

Raises:

ValueError – 如果输入的URL格式不正确。