This commit is contained in:
Lerking committed 2025-02-21 21:34:10 +01:00
1 parent e1516e8b45
commit f21433417d
7 files changed
+41 -32

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
import importlib
import sys
import os
import json
from abc import ABC, abstractmethod
class XtendRBase(ABC):
"""Abstract base class for all plugins.
Example:
>>> class TestPlugin(XtendRBase):
... def run(self):
... print("Running TestPlugin")
... def stop(self):
... print("Stopping TestPlugin")
>>> plugin = TestPlugin()
>>> plugin.run()
Running TestPlugin
>>> plugin.stop()
Stopping TestPlugin
"""
@abstractmethod
def run(self):
pass
@abstractmethod
def stop(self):
pass