enrobie.plugins.status package#

Submodules#

enrobie.plugins.status.common module#

class enrobie.plugins.status.common.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.

time: Time#
unique: str#
group: str#
title: str#
icon: StatusPluginIconParams#
state: Literal['pending', 'normal', 'failure', 'unknown']#

enrobie.plugins.status.helpers module#

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.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.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.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.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.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.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#

class enrobie.plugins.status.params.StatusPluginReportParams[source]#

Bases: RobieParamsModel

Contain information for constructing the chat messages.

Fields#

Field

Type

Required

Default

Constraints

client

str

Yes

min_length=1

delay

int

No

15

ge=0, le=864000

states

list[Literal[‘pending’, ‘normal’, ‘failure’, ‘unknown’]] | None

No

None

min_length=1

target

str

Yes

min_length=1

client: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Client where channel exists', metadata=[MinLen(min_length=1)])]#
target: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where the message will be sent', metadata=[MinLen(min_length=1)])]#
states: Annotated[list[Literal['pending', 'normal', 'failure', 'unknown']] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Which status value are related', metadata=[MinLen(min_length=1)])]#
delay: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=15, description='Period between status reports', metadata=[Ge(ge=0), Le(le=864000)])]#
class enrobie.plugins.status.params.StatusPluginCommandParams[source]#

Bases: RobieParamsModel

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

dsc

str

No

'!status'

min_length=2

irc

str

No

'!status'

min_length=2

mtm

str

No

'!status'

min_length=2

irc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!status', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
dsc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!status', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
mtm: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!status', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
class enrobie.plugins.status.params.StatusPluginIconParams[source]#

Bases: RobieParamsModel

Contain information for constructing the chat messages.

Fields#

Field

Type

Required

Default

Constraints

dsc

str | None

No

None

min_length=1

irc

str | None

No

None

min_length=1

mtm

str | None

No

None

min_length=1

irc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
mtm: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
class enrobie.plugins.status.params.StatusPluginIconsParams[source]#

Bases: RobieParamsModel

Contain information for constructing the chat messages.

Fields#

Field

Type

Required

Default

failure

StatusPluginIconParams

No

factory

normal

StatusPluginIconParams

No

factory

pending

StatusPluginIconParams

No

factory

unknown

StatusPluginIconParams

No

factory

pending: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
normal: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
failure: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
unknown: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per the chat platform')]#
class enrobie.plugins.status.params.StatusPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

command

StatusPluginCommandParams

No

factory

enable

bool

No

False

icons

StatusPluginIconsParams

No

factory

locate

str | None

No

None

min_length=1

reports

list[StatusPluginReportParams] | None

No

None

min_length=1

trusted

list[str] | None

No

None

min_length=1

reports: Annotated[list[StatusPluginReportParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Where to send status updates', metadata=[MinLen(min_length=1)])]#
command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')]#
icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')]#

enrobie.plugins.status.plugin module#

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.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[StatusPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: StatusPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property status: StatusPluginItems#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

report() None[source]#

Perform the operation related to Robie service threads.

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#

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.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[StatusPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: StatusPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property status: StatusPluginItems#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

report() None[source]#

Perform the operation related to Robie service threads.

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.

class enrobie.plugins.status.StatusPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

command

StatusPluginCommandParams

No

factory

enable

bool

No

False

icons

StatusPluginIconsParams

No

factory

locate

str | None

No

None

min_length=1

reports

list[StatusPluginReportParams] | None

No

None

min_length=1

trusted

list[str] | None

No

None

min_length=1

reports: Annotated[list[StatusPluginReportParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Where to send status updates', metadata=[MinLen(min_length=1)])]#
command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')]#
icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')]#
class enrobie.plugins.status.StatusPluginIconParams[source]#

Bases: RobieParamsModel

Contain information for constructing the chat messages.

Fields#

Field

Type

Required

Default

Constraints

dsc

str | None

No

None

min_length=1

irc

str | None

No

None

min_length=1

mtm

str | None

No

None

min_length=1

irc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
mtm: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(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.

time: Time#
unique: str#
group: str#
title: str#
icon: StatusPluginIconParams#
state: Literal['pending', 'normal', 'failure', 'unknown']#