This is a comparison among regular python class, python data class and pydantic basemodel in data handling, more specifically, writing data to a csv file.
For more details, please read my blog post: Python Class vs. Data Class vs. Pydantic: Write to CSV with data validation