NotNotMike@programming.dev to Python@programming.dev · 3 days agoOpinions: Dataclasses or Pydantic model base?message-squaremessage-square5fedilinkarrow-up111arrow-down11
arrow-up110arrow-down1message-squareOpinions: Dataclasses or Pydantic model base?NotNotMike@programming.dev to Python@programming.dev · 3 days agomessage-square5fedilink
minus-squareEndmaker@ani.sociallinkfedilinkEnglisharrow-up9·2 days 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.