errbot.bootstrap module

errbot.bootstrap.bootstrap(bot_class, logger: Logger, config: object, restore: str | None = None) None[source]

Main starting point of Errbot.

Parameters:
  • bot_class – The backend class inheriting from Errbot you want to start.

  • logger (Logger) – The logger you want to use.

  • config (object) – The config.py module.

  • restore – Start Errbot in restore mode (from a backup).

errbot.bootstrap.bot_config_defaults(config: object) None[source]
errbot.bootstrap.get_storage_plugin(config: object) Callable[source]

Find and load the storage plugin :type config: object :param config: the bot configuration. :return: the storage plugin

errbot.bootstrap.restore_bot_from_backup(backup_filename: str, *, bot, log: Logger)[source]

Restores the given bot by executing the ‘backup’ script.

The backup file is a python script which manually execute a series of commands on the bot to restore it to its previous state.

Parameters:
  • backup_filename (str) – the full path to the backup script.

  • bot – the bot instance to restore

  • log (Logger) – logger to use during the restoration process

errbot.bootstrap.setup_bot(backend_name: str, logger: Logger, config: object, restore: str | None = None) ErrBot[source]