Skip to content

Commit

Permalink
dataclass for artifact json
Browse files Browse the repository at this point in the history
  • Loading branch information
rteqs committed Nov 23, 2024
1 parent de64e70 commit c08da28
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/latch/types/plots.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c08da28

Please sign in to comment.