Do we still need dataclasses? // PYDANTIC tutorial
Video Statistics and Information
Channel: ArjanCodes
Views: 38,113
Rating: 4.979239 out of 5
Keywords: pydantic tutorial, pydantic basemodel, pydantic validator, pydantic vs dataclass, dataclass, python, python tutorial, python programming, python for beginners, python coding, pydantic, dataclasses, pydantic vs dataclasses, python data cleaning, python data validation, data validation in python, data sanitization tool, python dataclasses, dataclasses vs pydantic, python programming tutorial, python for beginners vscode, python interview questions, python programming course
Id: Vj-iU-8_xLs
Channel Id: undefined
Length: 16min 32sec (992 seconds)
Published: Fri Jun 18 2021
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Am I a slow typer or is this guy a fast typer because he makes me feel really slow lol
While Pydantic is a useful library, it has a heavy handed casting approach that can sometimes yield surprising results. This behavior is documented and I would suggest exploring the casting/conversion prior to adoption of the library for your app/project.
Here's an example of datetime conversion/casting that is perhaps not particularly obvious.
Yields
Another friction point I've run into with the library is how it defines "required optional" fields.
https://pydantic-docs.helpmanual.io/usage/models/#required-optional-fields