aboutsummaryrefslogtreecommitdiffstats
path: root/app/PluginInterface.py
blob: 6194436bc700eec4b1b3b2587dc0ca08d2fcc318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from abc import ABC, abstractmethod
from typing import Any

from app.Item import Item


class PluginInterface(ABC):
    def __init__(self, id: str, params: dict[str, Any]):
        self.id = id
        self.params = params

    @abstractmethod
    def validate_input_n(self, n: int) -> bool:
        raise NotImplemented("abstract method not implemented")

    @abstractmethod
    def process(self, inputs: list[list[Item]]) -> list[Item]:
        pass