openspg/python/knext/common/runnable.py
2023-12-11 11:28:27 +08:00

24 lines
479 B
Python

from pydantic import BaseConfig, BaseModel
class Runnable(BaseModel):
last: bool = False
@property
def input_types(self):
return
@property
def output_types(self):
return
def invoke(self, input):
raise NotImplementedError("To be implemented in subclass")
def __rshift__(self, other):
raise NotImplementedError("To be implemented in subclass")
class Config(BaseConfig):
arbitrary_types_allowed = True