From cd08357f122a506743a6ceea20a984d6892828a8 Mon Sep 17 00:00:00 2001 From: Wrench56 Date: Mon, 8 Jul 2024 02:45:29 -0400 Subject: [PATCH] Add abstract plugin class --- src/backend/plugins/base_plugin.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/backend/plugins/base_plugin.py diff --git a/src/backend/plugins/base_plugin.py b/src/backend/plugins/base_plugin.py new file mode 100644 index 0000000..b0d0e5c --- /dev/null +++ b/src/backend/plugins/base_plugin.py @@ -0,0 +1,30 @@ +from abc import ABC, abstractmethod + + +class Plugin(ABC): + def __init__(self) -> None: + pass + + @abstractmethod + def load(self) -> bool: + pass + + @abstractmethod + def unload(self) -> bool: + pass + + @abstractmethod + def health(self) -> bool: + pass + + @abstractmethod + def image(self) -> str: + pass + + @property + @abstractmethod + def name(self) -> str: + pass + + def __str__(self) -> str: + return f''