NotNotMike@programming.dev to Python@programming.dev · 1 month agoOpinions: Dataclasses or Pydantic model base?message-squaremessage-square4linkfedilinkarrow-up112arrow-down11
arrow-up111arrow-down1message-squareOpinions: Dataclasses or Pydantic model base?NotNotMike@programming.dev to Python@programming.dev · 1 month agomessage-square4linkfedilink
minus-squareEndmaker@ani.sociallinkfedilinkEnglisharrow-up9·1 month agoKeep it simple, stupid. I’d use the built-in dataclass (or something even simpler) where possible. Only when I need more functionalities (e.g. validation) would I switch to using Pydantic model.
Keep it simple, stupid.
I’d use the built-in dataclass (or something even simpler) where possible. Only when I need more functionalities (e.g. validation) would I switch to using Pydantic model.