3 ms·
I'm just here to say I largely agree with the author. I think a lot of this boils down to the functional approach that (c)attrs takes, vs Pydantic's OO. Becaus
by ledauphin 5y ago
I'm just here to say I largely agree with the author.
I think a lot of this boils down to the functional approach that (c)attrs takes, vs Pydantic's OO. Because it's more functional, there's higher composability and more power given to the user.
On my team, we use cattrs and add our own customizations to it to great effect, and these simply would not be possible with Pydantic.
That said, there are reasons Pydantic seems to be ascendant despite attrs being the library that inspired dataclasses. It's very much a batteries-included library, which fits the ethos of Python.