class glados.core.Glados(config_file=None, plugins_folder=None, bots_config_dir=None, plugins_config_dir=None)[source]

Bases: object

Glados is the core of the GLaDOS package.

  • config_file (Optional[str]) – path to config file
  • plugins_folder (Optional[str]) – path to plugins folder
  • bots_config_dir (Optional[str]) – path to bots config folder
  • plugins_config_dir (Optional[str]) – path to plugin config folder.


If config_file is passed in and the file has plugins_folder, bots_config_dir, plugins_config_dir in it , then the other parameters are not required


Add a new bot to GLaDOS.

Parameters:bot (GladosBot) – the bot to be added to GLaDOS
Return type:NoReturn

Add a plugin to GLaDOS

Parameters:plugin (GladosPlugin) – the plugin to be added to GLaDOS
Return type:NoReturn

Returns True if there is a datastore else False

Return type:bool

Import all discovered bots

Return type:NoReturn

Import all discovered plugins and add them to the plugin list.

Parameters:bot_name (Optional[str]) – If set GLaDOS will only import the bot name that is provided here.
Return type:NoReturn

Read the GLaDOS config file. If a bot name is provided it will only install that bot. Else it will install all bots.

Parameters:bot_name (Optional[str]) – If provided, install only the bot with this name.
Return type:NoReturn

Send a request to GLaDOS. This returns whatever the plugin returns.

This function will also set the datastore session for the request, try to find the interaction in the datastore and fetch it. This info is available in the request.

Parameters:request (GladosRequest) – the request to be sent to GLaDOS