EOX GitLab Instance

postprocess.py 294 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from abc import ABC, abstractmethod


class Postprocessor(ABC):
    @abstractmethod
    def postprocess(self, item: dict) -> dict:
        pass


POSTPROCESSORS = {

}


def get_postprocessor(config: dict) -> Postprocessor:
    cls = POSTPROCESSORS[config.pop("type")]
    return cls(**config)