malcolm.modules.web.parts

class malcolm.modules.web.parts.GuiServerPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller') = 'gui', path: Anno(name='APath', typ=<class 'str'>, description='Path to www directory to get files from') = '/home/runner/work/pymalcolm/pymalcolm/malcolm/modules/web/www')[source]

Static file server to be used as a fallback. Must be last part

Parameters
  • name (str) – The name of the Part within the Controller

  • path (str) – Path to www directory to get files from

on_report_handlers() Optional[Union[Anno(name='AHandlerInfos', typ=<class 'malcolm.modules.web.infos.HandlerInfo'>, description='Any handlers and regexps that should form part of tornado App'), Sequence[malcolm.modules.web.infos.HandlerInfo], malcolm.modules.web.infos.HandlerInfo]][source]
Returns

Any handlers and regexps that should form part of tornado App

Return type

HandlerInfo

class malcolm.modules.web.parts.RestfulServerPart(name: Anno(name='AName', typ=<class 'str'>, description='Part name and subdomain name to respond to queries on') = 'rest')[source]
Parameters

name (str) – Part name and subdomain name to respond to queries on

on_report_handlers() Optional[Union[Anno(name='AHandlerInfos', typ=<class 'malcolm.modules.web.infos.HandlerInfo'>, description='Any handlers and regexps that should form part of tornado App'), Sequence[malcolm.modules.web.infos.HandlerInfo], malcolm.modules.web.infos.HandlerInfo]][source]
Returns

Any handlers and regexps that should form part of tornado App

Return type

HandlerInfo

class malcolm.modules.web.parts.WebsocketServerPart(name: Anno(name='AName', typ=<class 'str'>, description='Part name and subdomain name to host websocket on') = 'ws', subnet_validation: Anno(name='ASubnetValidation', typ=<class 'bool'>, description='If True, check any client is in the same subnet as the host') = True)[source]
Parameters
  • name (str) – Part name and subdomain name to host websocket on

  • subnet_validation (bool) – If True, check any client is in the same subnet as the host

on_report_handlers() Optional[Union[Anno(name='AHandlerInfos', typ=<class 'malcolm.modules.web.infos.HandlerInfo'>, description='Any handlers and regexps that should form part of tornado App'), Sequence[malcolm.modules.web.infos.HandlerInfo], malcolm.modules.web.infos.HandlerInfo]][source]
Returns

Any handlers and regexps that should form part of tornado App

Return type

HandlerInfo