Source code for app.lib.schema
from typing import Any
import msgspec
[docs]
class BaseStruct(msgspec.Struct):
def to_dict(self) -> dict[str, Any]:
return {f: getattr(self, f) for f in self.__struct_fields__ if getattr(self, f, None) != msgspec.UNSET}