enrobie.plugins.status package#
Subpackages#
Submodules#
enrobie.plugins.status.common module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
enrobie.plugins.status.helpers module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- enrobie.plugins.status.helpers.composedsc(plugin: StatusPlugin, mitem: RobieMessage) None [source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.status.helpers.composeirc(plugin: StatusPlugin, mitem: RobieMessage) None [source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.status.helpers.composemtm(plugin: StatusPlugin, mitem: RobieMessage) None [source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.status.helpers.grouped(plugin: StatusPlugin) dict[str, list[StatusPluginItem]] [source]#
Return the dictionary with status value stored by group.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- Returns:
Dictionary with status value stored by group.
- enrobie.plugins.status.helpers.reportdsc(plugin: StatusPlugin, client: RobieClient, status: StatusPluginItem, report: StatusPluginReportParams) None [source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
client – Client class instance for Chatting Robie.
status – Object containing the status information.
report – Object containing the report information.
- enrobie.plugins.status.helpers.reportirc(plugin: StatusPlugin, client: RobieClient, status: StatusPluginItem, report: StatusPluginReportParams) None [source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
client – Client class instance for Chatting Robie.
status – Object containing the status information.
report – Object containing the report information.
- enrobie.plugins.status.helpers.reportmtm(plugin: StatusPlugin, client: RobieClient, status: StatusPluginItem, report: StatusPluginReportParams) None [source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
client – Client class instance for Chatting Robie.
status – Object containing the status information.
report – Object containing the report information.
enrobie.plugins.status.params module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- pydantic model enrobie.plugins.status.params.StatusPluginCommandParams[source]#
Bases:
RobieParamsModel
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "StatusPluginCommandParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "irc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Irc", "type": "string" }, "dsc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Dsc", "type": "string" }, "mtm": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Mtm", "type": "string" } }, "additionalProperties": false }
- field dsc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!status', description='Command name for chat platform', metadata=[MinLen(min_length=2)])] = '!status'#
Command name for chat platform
- Constraints:
min_length = 2
- pydantic model enrobie.plugins.status.params.StatusPluginIconParams[source]#
Bases:
RobieParamsModel
Contain information for constructing the chat messages.
Show JSON schema
{ "title": "StatusPluginIconParams", "description": "Contain information for constructing the chat messages.", "type": "object", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])] = None#
Icon used for the chat platform
- Constraints:
min_length = 1
- pydantic model enrobie.plugins.status.params.StatusPluginIconsParams[source]#
Bases:
RobieParamsModel
Contain information for constructing the chat messages.
Show JSON schema
{ "title": "StatusPluginIconsParams", "description": "Contain information for constructing the chat messages.", "type": "object", "properties": { "pending": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "normal": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "failure": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "unknown": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" } }, "$defs": { "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field failure: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform
- field normal: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform
- field pending: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform
- field unknown: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform
- pydantic model enrobie.plugins.status.params.StatusPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "StatusPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "reports": { "anyOf": [ { "items": { "$ref": "#/$defs/StatusPluginReportParams" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Where to send status updates", "title": "Reports" }, "command": { "$ref": "#/$defs/StatusPluginCommandParams", "description": "Command name per chat platform" }, "icons": { "$ref": "#/$defs/StatusPluginIconsParams", "description": "Icon used per the chat platform" } }, "$defs": { "StatusPluginCommandParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "irc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Irc", "type": "string" }, "dsc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Dsc", "type": "string" }, "mtm": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Mtm", "type": "string" } }, "title": "StatusPluginCommandParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" }, "StatusPluginIconsParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "pending": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "normal": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "failure": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "unknown": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" } }, "title": "StatusPluginIconsParams", "type": "object" }, "StatusPluginReportParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "client": { "description": "Client where channel exists", "minLength": 1, "title": "Client", "type": "string" }, "target": { "description": "Where the message will be sent", "minLength": 1, "title": "Target", "type": "string" }, "states": { "anyOf": [ { "items": { "enum": [ "pending", "normal", "failure", "unknown" ], "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Which status value are related", "title": "States" }, "delay": { "default": 15, "description": "Period between status reports", "maximum": 864000, "minimum": 0, "title": "Delay", "type": "integer" } }, "required": [ "client", "target" ], "title": "StatusPluginReportParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')] [Optional]#
Command name per chat platform
- field enable: Annotated[bool, Field(False, description='Determine whether child enabled')] = False#
Determine whether child enabled
- field icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform
- field locate: Annotated[str | None, Field(None, description='For which plugin are parameters', examples=['enrobie.plugins.AinswerPlugin', 'enrobie.plugins.AutoJoinPlugin', 'enrobie.plugins.AutoNickPlugin', 'enrobie.plugins.StatusPlugin'], min_length=1)] = None#
For which plugin are parameters
- Constraints:
min_length = 1
- pydantic model enrobie.plugins.status.params.StatusPluginReportParams[source]#
Bases:
RobieParamsModel
Contain information for constructing the chat messages.
Show JSON schema
{ "title": "StatusPluginReportParams", "description": "Contain information for constructing the chat messages.", "type": "object", "properties": { "client": { "description": "Client where channel exists", "minLength": 1, "title": "Client", "type": "string" }, "target": { "description": "Where the message will be sent", "minLength": 1, "title": "Target", "type": "string" }, "states": { "anyOf": [ { "items": { "enum": [ "pending", "normal", "failure", "unknown" ], "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Which status value are related", "title": "States" }, "delay": { "default": 15, "description": "Period between status reports", "maximum": 864000, "minimum": 0, "title": "Delay", "type": "integer" } }, "additionalProperties": false, "required": [ "client", "target" ] }
- Config:
extra: str = forbid
- Fields:
- field client: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Client where channel exists', metadata=[MinLen(min_length=1)])] [Required]#
Client where channel exists
- Constraints:
min_length = 1
- field delay: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=15, description='Period between status reports', metadata=[Ge(ge=0), Le(le=864000)])] = 15#
Period between status reports
- Constraints:
ge = 0
le = 864000
enrobie.plugins.status.plugin module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.status.plugin.StatusPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePlugin
Integrate with the Robie routine and perform operations.
Note
This plugin responds to inquiries about Robie status.
- property params: StatusPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[StatusPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property status: StatusPluginItems#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- update(unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown']) None [source]#
Update or insert the status of the Robie child instance.
- Parameters:
unique – Unique identifier to use for the status.
group – Name for the group the status is membered.
title – Friendly name of the related unique entry.
icon – Optional icon object if supported platform.
state – One of several possible value for status.
Module contents#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.status.StatusPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePlugin
Integrate with the Robie routine and perform operations.
Note
This plugin responds to inquiries about Robie status.
- property params: StatusPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[StatusPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property status: StatusPluginItems#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- update(unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown']) None [source]#
Update or insert the status of the Robie child instance.
- Parameters:
unique – Unique identifier to use for the status.
group – Name for the group the status is membered.
title – Friendly name of the related unique entry.
icon – Optional icon object if supported platform.
state – One of several possible value for status.
- pydantic model enrobie.plugins.status.StatusPluginIconParams[source]#
Bases:
RobieParamsModel
Contain information for constructing the chat messages.
Show JSON schema
{ "title": "StatusPluginIconParams", "description": "Contain information for constructing the chat messages.", "type": "object", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])] = None#
Icon used for the chat platform
- Constraints:
min_length = 1
- class enrobie.plugins.status.StatusPluginItem(time: Time, unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown'])[source]#
Bases:
object
Contain the relevant status information for the entry.
- icon: StatusPluginIconParams#
- pydantic model enrobie.plugins.status.StatusPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "StatusPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "reports": { "anyOf": [ { "items": { "$ref": "#/$defs/StatusPluginReportParams" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Where to send status updates", "title": "Reports" }, "command": { "$ref": "#/$defs/StatusPluginCommandParams", "description": "Command name per chat platform" }, "icons": { "$ref": "#/$defs/StatusPluginIconsParams", "description": "Icon used per the chat platform" } }, "$defs": { "StatusPluginCommandParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "irc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Irc", "type": "string" }, "dsc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Dsc", "type": "string" }, "mtm": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Mtm", "type": "string" } }, "title": "StatusPluginCommandParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" }, "StatusPluginIconsParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "pending": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "normal": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "failure": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "unknown": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" } }, "title": "StatusPluginIconsParams", "type": "object" }, "StatusPluginReportParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "client": { "description": "Client where channel exists", "minLength": 1, "title": "Client", "type": "string" }, "target": { "description": "Where the message will be sent", "minLength": 1, "title": "Target", "type": "string" }, "states": { "anyOf": [ { "items": { "enum": [ "pending", "normal", "failure", "unknown" ], "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Which status value are related", "title": "States" }, "delay": { "default": 15, "description": "Period between status reports", "maximum": 864000, "minimum": 0, "title": "Delay", "type": "integer" } }, "required": [ "client", "target" ], "title": "StatusPluginReportParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')] [Optional]#
Command name per chat platform
- field enable: Annotated[bool, Field(False, description='Determine whether child enabled')] = False#
Determine whether child enabled
- field icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform
- field locate: Annotated[str | None, Field(None, description='For which plugin are parameters', examples=['enrobie.plugins.AinswerPlugin', 'enrobie.plugins.AutoJoinPlugin', 'enrobie.plugins.AutoNickPlugin', 'enrobie.plugins.StatusPlugin'], min_length=1)] = None#
For which plugin are parameters
- Constraints:
min_length = 1