Loading...
「ツール」は右上に移動しました。
利用したサーバー: natural-voltaic-titanium
4146いいね 96127回再生

Attrs, Pydantic, or Python Data Classes?

💡 Learn how to design great software in 7 steps: arjan.codes/designguide.

Data classes are a valuable tool in the Python programmer's toolkit. Despite their usefulness (I do like them a lot!), they do have limitations. In this video, I compare dataclasses with two alternative options, attrs and Pydantic, to help you decide which one to use in your code.

GitHub repository here: github.com/ArjanCodes/2023-attrs

🎓 ArjanCodes Courses: www.arjancodes.com/courses/

🔖 Chapters:
0:00 Intro
1:34 Example explanation
4:20 Comparison
7:07 Attribute validation
11:26 Pros and cons dataclasses
13:00 Pros and cons attrs
14:14 Pros and cons Pydantic
15:58 Final thoughts
16:42 Outro

#arjancodes #softwaredesign #python

コメント