Skip to content

Instantly share code, notes, and snippets.

@naturalwarren
Created April 8, 2023 19:32
Show Gist options
  • Save naturalwarren/dc0f98ca5a7458183bcd29e933b3f3fb to your computer and use it in GitHub Desktop.
Save naturalwarren/dc0f98ca5a7458183bcd29e933b3f3fb to your computer and use it in GitHub Desktop.
SDUI Action
class Action(BaseModel, ABC):
sdui_action_type: ActionType
def __init__(self, **data) -> None:
data['sdui_action_type'] = self.action_type()
super().__init__(**data)
@classmethod
@abstractmethod
def action_type(cls) -> ActionType:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment