enrobie.clients package#

Subpackages#

Module contents#

class enrobie.clients.IRCClient(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobieClient

Establish and maintain connection with the chat service.

validate() None[source]#

Perform advanced validation on the parameters provided.

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

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: IRCClientParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property family: Literal['irc']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property channels: ClientChannels#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property publish: ClientPublish#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property client: Client#

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.

get_message(event: ClientEvent | None = None) IRCMessage[source]#

Return the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:

event – Raw event received from the network peer.

Returns:

New item containing information for operation.

put_message(mqueue: RobieQueue[RobieMessage], event: ClientEvent | None = None) None[source]#

Insert the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • mqueue – Queue instance where the item is received.

  • event – Raw event received from the network peer.

get_command(event: str | None = None) IRCCommand[source]#

Return the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:

event – Raw event to be sent to the network peer.

Returns:

New item containing information for operation.

put_command(cqueue: RobieQueue[RobieCommand], event: str | None = None) None[source]#

Insert the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • cqueue – Queue instance where the item is received.

  • event – Raw event to be sent to the network peer.

compose(target: str, content: str) RobieCommand[source]#

Compose the message and transmit using the chat client.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • target – Where the composed message will be sent.

  • content – Content that will be source of message.

class enrobie.clients.IRCClientParams[source]#

Bases: RobieClientParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

client

ClientParams

Yes

delay

int

No

15

ge=1, le=300

enable

bool

No

False

locate

str | None

No

None

min_length=1

status

StatusPluginIconParams

No

factory

client: Annotated[ClientParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the base client')]#
delay: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=15, description='Period to wait for reconnect', metadata=[Ge(ge=1), Le(le=300)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.clients.DSCClient(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobieClient

Establish and maintain connection with the chat service.

validate() None[source]#

Perform advanced validation on the parameters provided.

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

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: DSCClientParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property family: Literal['discord']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property channels: ClientChannels#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property publish: ClientPublish#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property client: Client#

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.

get_message(event: ClientEvent | None = None) DSCMessage[source]#

Return the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:

event – Raw event received from the network peer.

Returns:

New item containing information for operation.

put_message(mqueue: RobieQueue[RobieMessage], event: ClientEvent | None = None) None[source]#

Insert the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • mqueue – Queue instance where the item is received.

  • event – Raw event received from the network peer.

get_command(method: Literal['delete', 'get', 'post', 'patch', 'put'] | None = None, path: str | None = None, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) DSCCommand[source]#

Return the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Returns:

New item containing information for operation.

Parameters:
  • method – Method for operation with the API server.

  • path – Path for the location to upstream endpoint.

  • params – Optional parameters included in request.

  • json – Optional JSON payload included in request.

put_command(cqueue: RobieQueue[RobieCommand], method: Literal['delete', 'get', 'post', 'patch', 'put'] | None = None, path: str | None = None, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) None[source]#

Insert the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • cqueue – Queue instance where the item is received.

  • method – Method for operation with the API server.

  • path – Path for the location to upstream endpoint.

  • params – Optional parameters included in request.

  • json – Optional JSON payload included in request.

compose(target: str, content: str) RobieCommand[source]#

Compose the message and transmit using the chat client.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • target – Where the composed message will be sent.

  • content – Content that will be source of message.

class enrobie.clients.DSCClientParams[source]#

Bases: RobieClientParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

client

ClientParams

Yes

delay

int

No

15

ge=1, le=300

enable

bool

No

False

intents

int

No

4609

ge=0, le=65535

locate

str | None

No

None

min_length=1

status

StatusPluginIconParams

No

factory

client: Annotated[ClientParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the base client')]#
intents: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=4609, description='Timeout connecting to server', metadata=[Ge(ge=0), Le(le=65535)])]#
delay: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=15, description='Period to wait for reconnect', metadata=[Ge(ge=1), Le(le=300)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.clients.MTMClient(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobieClient

Establish and maintain connection with the chat service.

validate() None[source]#

Perform advanced validation on the parameters provided.

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

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: MTMClientParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property family: Literal['mattermost']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property channels: ClientChannels#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property publish: ClientPublish#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property client: Client#

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.

get_message(event: ClientEvent | None = None) MTMMessage[source]#

Return the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:

event – Raw event received from the network peer.

Returns:

New item containing information for operation.

put_message(mqueue: RobieQueue[RobieMessage], event: ClientEvent | None = None) None[source]#

Insert the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • mqueue – Queue instance where the item is received.

  • event – Raw event received from the network peer.

get_command(method: Literal['delete', 'get', 'post', 'patch', 'put'] | None = None, path: str | None = None, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) MTMCommand[source]#

Return the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Returns:

New item containing information for operation.

Parameters:
  • method – Method for operation with the API server.

  • path – Path for the location to upstream endpoint.

  • params – Optional parameters included in request.

  • json – Optional JSON payload included in request.

put_command(cqueue: RobieQueue[RobieCommand], method: Literal['delete', 'get', 'post', 'patch', 'put'] | None = None, path: str | None = None, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) None[source]#

Insert the new item containing information for operation.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • cqueue – Queue instance where the item is received.

  • method – Method for operation with the API server.

  • path – Path for the location to upstream endpoint.

  • params – Optional parameters included in request.

  • json – Optional JSON payload included in request.

compose(target: str, content: str) RobieCommand[source]#

Compose the message and transmit using the chat client.

Note

Though parameters are marked optional, that is not necessarily the case; for typing purposes one cannot introduce required parameters outside of the parent.

Parameters:
  • target – Where the composed message will be sent.

  • content – Content that will be source of message.

class enrobie.clients.MTMClientParams[source]#

Bases: RobieClientParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

client

ClientParams

Yes

delay

int

No

15

ge=1, le=300

enable

bool

No

False

locate

str | None

No

None

min_length=1

status

StatusPluginIconParams

No

factory

client: Annotated[ClientParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the base client')]#
delay: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=15, description='Period to wait for reconnect', metadata=[Ge(ge=1), Le(le=300)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#