From c08da282769bf2bd63b30891ff416cab567875db Mon Sep 17 00:00:00 2001 From: Ryan Teoh Date: Sat, 23 Nov 2024 13:13:05 -0800 Subject: [PATCH] dataclass for artifact json --- src/latch/types/plots.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/latch/types/plots.py diff --git a/src/latch/types/plots.py b/src/latch/types/plots.py new file mode 100644 index 00000000..184a0d6e --- /dev/null +++ b/src/latch/types/plots.py @@ -0,0 +1,19 @@ +from dataclasses import dataclass +from typing import Any, Optional + +@dataclass(frozen=True) +class WidgetValue: + value: Any + +@dataclass(frozen=True) +class PlotsArtifactTemplate: + id: str + widgetValues: Optional[dict[str, WidgetValue]] = None + +@dataclass(frozen=True) +class PlotsArtifactBindings: + plotTemplates: list[PlotsArtifactTemplate] + +@dataclass(frozen= True) +class PlotsArtifact: + bindings: PlotsArtifactBindings