Automation#
- class autofold.automation.Automation(tiny_db_path: str)#
Warning
Automations MUST be registered with the bot for the object attributes to be set. This must be done before you run the automation.
Note
All child classes of automation are provided a local tinydb for non-volatile storage if needed. Note that tinydb is NOT threadsafe; proper access safety should be used when accessing data between automations. Feel free to use your own storage medium as you see fit.
Attributes:#
automation_bot: The AutomationBot instance.manifold_api: The ManifoldAPI instance extracted from automation_bot.manifold_db_reader: The ManifoldDatabaseReader instance extracted from automation_bot.manifold_subscriber: The ManifoldSubscriber instance extracted from automation_bot.db: The TinyDB instance for this automation.
- abstract start(*args, **kwargs)#
Abstract method to start the automation.
Note
This method must be implemented in subclasses.
- Parameters:
args – Additional positional arguments.
kwargs – Additional keyword arguments.
- abstract stop(*args, **kwargs)#
Abstract method to stop the automation.
Note
This method must be implemented in subclasses.
- Parameters:
args – Additional positional arguments.
kwargs – Additional keyword arguments.