enrobie.clients.irc package#

Subpackages#

Submodules#

enrobie.clients.irc.client 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.clients.irc.client.IRCClient(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobieClient

Establish and maintain connection with the chat service.

property channels: ClientChannels#

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.

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.

property family: Literal['irc']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

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.

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.

operate() None[source]#

Perform the operation related to Robie service threads.

property params: IRCClientParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property publish: ClientPublish#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

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.

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.

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

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

validate() None[source]#

Perform advanced validation on the parameters provided.

enrobie.clients.irc.command 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.clients.irc.command.IRCCommand(client: RobieClient, event: str)[source]#

Bases: RobieCommand

Contain information for sharing using the Python queue.

event: str#
property family: Literal['irc']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

enrobie.clients.irc.message 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.clients.irc.message.IRCMessage(client: RobieClient, event: ClientEvent)[source]#

Bases: RobieMessage

Contain information for sharing using the Python queue.

property anchor: str | None#

Return the unique value for the context with the client.

Returns:

Unique value for the context with the client.

property author: tuple[str, str] | None#

Return the current nickname of the client on the server.

Returns:

Current nickname of the client on the server.

event: ClientEvent#
property family: Literal['irc']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property hasme: bool#

Return the boolean indicating message mention the client.

Returns:

Boolean indicating message mention the client.

property isme: bool#

Return the boolean indicating message origin from client.

Returns:

Boolean indicating message origin from client.

property kind: RobieMessageKinds#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property message: str | None#

Return the string containing the content of the message.

Returns:

String containing the content of the message.

reply(robie: Robie, content: str) RobieCommand[source]#

Compose the message and transmit using the chat client.

Parameters:
  • robie – Primary class instance for Chatting Robie.

  • content – Content that will be source of message.

property whome: tuple[str, str] | None#

Return the current nickname of the client on the server.

Returns:

Current nickname of the client on the server.

enrobie.clients.irc.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.

class enrobie.clients.irc.params.IRCClientParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, enable: bool = False, locate: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, client: ~enconnect.irc.params.ClientParams, delay: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=300)] = 15, status: ~enrobie.plugins.status.params.StatusPluginIconParams = <factory>)[source]#

Bases: RobieClientParams

Process and validate the Robie configuration parameters.

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)])]#
model_config = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#

enrobie.clients.irc.states 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.clients.irc.states.ClientChannels[source]#

Bases: ClientChannels

Cache the information regarding client status on server.

create(unique: str) None[source]#

Create the channel within the internal cache dictionary.

Parameters:

unique – Unique identifier for channel on server.

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.clients.irc.IRCClient(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobieClient

Establish and maintain connection with the chat service.

property channels: ClientChannels#

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.

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.

property family: Literal['irc']#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

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.

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.

operate() None[source]#

Perform the operation related to Robie service threads.

property params: IRCClientParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property publish: ClientPublish#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

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.

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.

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

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

validate() None[source]#

Perform advanced validation on the parameters provided.

class enrobie.clients.irc.IRCClientParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, enable: bool = False, locate: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, client: ~enconnect.irc.params.ClientParams, delay: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=300)] = 15, status: ~enrobie.plugins.status.params.StatusPluginIconParams = <factory>)[source]#

Bases: RobieClientParams

Process and validate the Robie configuration parameters.

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)])]#
model_config = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#