Source code for bokeh.protocol.messages.server_info_reply
#-----------------------------------------------------------------------------# Copyright (c) Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Standard library importsfromtypingimportAny,TypedDict# Bokeh importsfrombokehimport__version__# Bokeh importsfrom...core.typesimportIDfrom..messageimportMessage#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('server_info_reply',)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------classVersionInfo(TypedDict):bokeh:strserver:strclassServerInfo(TypedDict):version_info:VersionInfo
[docs]classserver_info_reply(Message[ServerInfo]):''' Define the ``SERVER-INFO-REPLY`` message for replying to Server info requests from clients. The ``content`` fragment of for this message is has the form: .. code-block:: python { 'version_info' : { 'bokeh' : <bokeh library version> 'server' : <bokeh server version> } } '''msgtype='SERVER-INFO-REPLY'
[docs]@classmethoddefcreate(cls,request_id:ID,**metadata:Any)->server_info_reply:''' Create an ``SERVER-INFO-REPLY`` message Args: request_id (str) : The message ID for the message that issues the info request Any additional keyword arguments will be put into the message ``metadata`` fragment as-is. '''header=cls.create_header(request_id=request_id)content=ServerInfo(version_info=_VERSION_INFO)returncls(header,metadata,content)