add from dict to symbol

This commit is contained in:
stuart committed 2026-02-26 10:22:11 +01:00
1 parent a750653b3b
commit 34384ba828
1 file changed
+8
+8
View File
@@ -12,3 +12,11 @@ class Symbol(BaseModel):
id: int
label: str
image: str # Base64-encoded PNG image data
def from_dict(cls, data: dict) -> "Symbol":
return cls(
id=data["id"],
label=data["label"],
image=data["image"],
)