A little secret to rock your YouTube subscribers
Get Free YouTube Subscribers, Views and Likes

Do We Still Need Dataclasses? // PYDANTIC Tutorial

Follow
ArjanCodes

Pydantic is a very useful package that makes dealing with data much easier, similar to what Python's builtin dataclasses do. Where Pydantic shines is in dealing with validating and sanitizing data. In this tutorial video, I show you how it works, and when to choose Pydantic over dataclasses in your code projects.

The code that I worked on in this video is available here: https://github.com/ArjanCodes/2021py....

Here's my FREE 7step guide to help you consistently design great software: https://arjancodes.com/designguide.

Courses:
The Software Designer Mindset: https://www.arjancodes.com/mindset
The Software Designer Mindset Team Packages: https://www.arjancodes.com/sas
The Software Architect Mindset: Preregister now! https://www.arjancodes.com/architect
Next Level Python: Become a Python Expert: https://www.arjancodes.com/nextlevel...
The 30Day Design Challenge: https://www.arjancodes.com/30ddc

GEAR & RECOMMENDED BOOKS: https://kit.co/arjancodes.

A few interesting links to articles and books:
Design Patterns: Elements of Reusable ObjectOriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides: https://amzn.to/3jllgyH
Principles of Package Design: Creating Reusable Software Components by Matthias Noback: https://amzn.to/2NETK3l
Clean Code: A Handbook of Agile Software Craftsmanship by Robert Martin: https://amzn.to/3qVZgNs
The original Design Principles and Design Patterns article by Robert Martin: https://fi.ort.edu.uy/innovaportal/fi...

If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

Join my Discord server here: https://discord.arjan.codes
Twitter:   / arjancodes  
LinkedIn:   / arjancodes  
Facebook:   / arjancodes  

Channel code reviewer board:
0xUnicorn
Ryan Laursen
Sybren A. Stüvel

Chapters:
0:00 Intro
0:52 Explaining the example
1:54 Creating a Pydantic Basemodel
4:42 Adding field validation
9:47 Adding modellevel validation
12:54 More possibilities by adding a Config class
14:03 Converting the model instances to a dictionary
14:38 Other things that Pydantic can do
15:38 So, are dataclasses obsolete?

#arjancodes #softwaredesign #python

DISCLAIMER The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!

posted by shiny399046