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
- GuiHandler¶
alias of
malcolm.modules.web.parts.guiserverpart.IndexHandler
- setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶
Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
- 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
- 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
- setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶
Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
- 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
- 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
- setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶
Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
- 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