Рет қаралды 6,543
In this video, we look at some more Pydantic features, based on this post:
bugbytes.io/po...
We'll look at:
- Customization of fields with the Pydantic Field() function
- Using aliases and default values in fields
- Advanced techniques for exporting models and nested lists of submodels
- The Model Config class for applying model-wide configuration in a Pydantic model.
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:44 Pydantic Field() function for default values
05:01 Using aliases in Pydantic Field function
06:20 Controlling Model Export data using the Field function
09:07 Controlling model exports with dict() and json() functions
10:34 Controlling model exports for nested Pydantic models
15:19 Pydantic Model Config classes
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
ko-fi.com/bugb...
▶️ Full Playlist:
• Pydantic
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: bugbytes.io/po...
👾 Github: github.com/bug...
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Blog Post: bugbytes.io/po...
Pydantic Field customisation: docs.pydantic....
Advanced Pydantic Model Exports: docs.pydantic....
Pydantic Model Config classes: docs.pydantic....
Github Data: github.com/bug...
#python #pydantic #datascience