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

from app.Item import Item

Params: TypeAlias = dict[str, str]


class PluginInterface(ABC):
    def __init__(self, id: str, params: Params):
        self.id = id
        self.params = params

    @abstractmethod
    def process(self, source_id: str | None, items: list[Item]) -> list[Item]:
        pass