ohnope.ohnope package#

Subpackages#

Submodules#

ohnope.ohnope.config module#

Functions and routines associated with rawberth Oh-nope IRC Services.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class ohnope.ohnope.config.OhnopeConfig(sargs: dict[str, Any] | None = None, files: str | Path | list[str | Path] | tuple[str | Path] | set[str] | None = None, cargs: dict[str, Any] | None = None)#

Bases: Config

Contain the configurations from the arguments and files.

Parameters:
  • sargs – Additional arguments on the command line.

  • files – Complete or relative path to config files.

  • cargs – Configuration arguments in dictionary form, which will override contents from the config files.

merge_params() None#

Update the Pydantic model containing the configuration.

property params: OhnopeParams#

Return the Pydantic model containing the configuration.

Warning

This method completely overrides the parent but is based on that code, would be unfortunate if upstream changes meant this breaks or breaks something else.

Returns:

Pydantic model containing the configuration.

property robie: RobieConfig#

Return the Config instance containing the configuration.

Returns:

Config instance containing the configuration.

ohnope.ohnope.ohnope module#

Functions and routines associated with rawberth Oh-nope IRC Services.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class ohnope.ohnope.ohnope.Ohnope(config: OhnopeConfig)#

Bases: object

Interact with chat networks and integrate using plugins.

Parameters:

config – Primary class instance for configuration.

property client: IRCClient#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property config: OhnopeConfig#

Return the Config instance containing the configuration.

Returns:

Config instance containing the configuration.

property dumped: dict[str, Any]#

Return the facts about the attributes from the instance.

Returns:

Facts about the attributes from the instance.

property logger: RobieLogger#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property params: OhnopeParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

register(cqueue: RobieQueue[RobieCommand], nickname: str, realname: str, unique: str) None#

Register the service as a client within the IRC network.

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

  • nickname – Nickname that will be used for client.

  • realname – Realname that will be used for client.

  • unique – Unique identifer for the service client.

property robie: Robie#

Return the Robie instance to which the instance belongs.

Returns:

Robie instance to which the instance belongs.

class ohnope.ohnope.ohnope.Robie(ohnope: Ohnope, config: RobieConfig)#

Bases: Robie

Interact with chat networks and integrate using plugins.

Parameters:

config – Primary class instance for configuration.

property ohnope: Ohnope#

Return the Ohnope instance to which the instance belongs.

Returns:

Ohnope instance to which the instance belongs.

Module contents#

Functions and routines associated with rawberth Oh-nope IRC Services.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class ohnope.ohnope.Ohnope(config: OhnopeConfig)#

Bases: object

Interact with chat networks and integrate using plugins.

Parameters:

config – Primary class instance for configuration.

property client: IRCClient#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property config: OhnopeConfig#

Return the Config instance containing the configuration.

Returns:

Config instance containing the configuration.

property dumped: dict[str, Any]#

Return the facts about the attributes from the instance.

Returns:

Facts about the attributes from the instance.

property logger: RobieLogger#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property params: OhnopeParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

register(cqueue: RobieQueue[RobieCommand], nickname: str, realname: str, unique: str) None#

Register the service as a client within the IRC network.

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

  • nickname – Nickname that will be used for client.

  • realname – Realname that will be used for client.

  • unique – Unique identifer for the service client.

property robie: Robie#

Return the Robie instance to which the instance belongs.

Returns:

Robie instance to which the instance belongs.

class ohnope.ohnope.OhnopeConfig(sargs: dict[str, Any] | None = None, files: str | Path | list[str | Path] | tuple[str | Path] | set[str] | None = None, cargs: dict[str, Any] | None = None)#

Bases: Config

Contain the configurations from the arguments and files.

Parameters:
  • sargs – Additional arguments on the command line.

  • files – Complete or relative path to config files.

  • cargs – Configuration arguments in dictionary form, which will override contents from the config files.

merge_params() None#

Update the Pydantic model containing the configuration.

property params: OhnopeParams#

Return the Pydantic model containing the configuration.

Warning

This method completely overrides the parent but is based on that code, would be unfortunate if upstream changes meant this breaks or breaks something else.

Returns:

Pydantic model containing the configuration.

property robie: RobieConfig#

Return the Config instance containing the configuration.

Returns:

Config instance containing the configuration.

class ohnope.ohnope.Robie(ohnope: Ohnope, config: RobieConfig)#

Bases: Robie

Interact with chat networks and integrate using plugins.

Parameters:

config – Primary class instance for configuration.

property ohnope: Ohnope#

Return the Ohnope instance to which the instance belongs.

Returns:

Ohnope instance to which the instance belongs.