#Hi! Is there any difference between dataclassDTO and MsgspecDTO in terms of usage and performance?

1 messages · Page 1 of 1 (latest)

timid rampartBOT
#
Notes for Hi! Is there any difference between dataclassDTO and MsgspecDTO in terms of usage and performance?
At your assistance

@long turtle

No Response?

If no response in a reasonable time, ping @Member.

Closing

To close, type !solve or byte solve.

MCVE

Please include an MCVE so that we can reproduce your issue locally.

opaque phoenix
#

I'll let @bleak sluice weigh in as well, but I would not think there's any additional improvement beyond what you'd get with the move from dataclasses to Structs.

All of the DTOs are designed to convert an input schema (Pydantic, Dataclass, Msgspec, SQLAlchemy, etc) to a Msgspec Struct

#

So the DataclassDTO is still generating a Msgspec Struct as the output model

#

the Dataclass part refers to what the input model is

long turtle
#

Understood, thanks