Skip to content

Commit

Permalink
Add abstract plugin class
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrench56 committed Jul 8, 2024
1 parent 7aedb59 commit cd08357
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/backend/plugins/base_plugin.py
Original file line number Diff line number Diff line change
@@ -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'<Plugin "{self.name}">'

0 comments on commit cd08357

Please sign in to comment.