Pydantic Introduction - Models, Fields, Constrained Types, Validator Functions and Model Exports
Автор: BugBytes
Загружено: 27 февр. 2023 г.
Просмотров: 20 717 просмотров
In this video, we dive into the Pydantic library in Python. This is based on the following blog post:
https://www.bugbytes.io/posts/introdu...
We'll learn a number of things, including:
1. How to define Pydantic model classes and fields with type-annotations.
2. How to define Optional fields and constrained fields
3. How to work with complex Python types such as UUID, Enum and date objects
4. How to define a custom validator function for a field on the model
5. How to export models to JSON and Python dictionaries
Github data: https://github.com/bugbytes-io/datasets
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
01:13 Analysis of the structure of the data to model
02:47 Installing Pydantic and Requests packages
04:02 Defining Pydantic model class
06:22 Creating Optional fields on the Pydantic model
11:09 Constrained fields in Pydantic
15:23 Using custom validator functions in Pydantic
19:54 Using Enums as types in Pydantic models
22:22 Exporting Pydantic models to dictionaries and JSON
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes
▶️ Full Playlist:
• Pydantic
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://www.bugbytes.io/posts/introdu...
👾 Github: https://github.com/bugbytes-io/datasets
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Pydantic Blog post: https://www.bugbytes.io/posts/introdu...
Github Dataset: https://github.com/bugbytes-io/datasets
Pydantic Models: https://docs.pydantic.dev/usage/models/
Pydantic Validators: https://docs.pydantic.dev/usage/valid...
#python #pydantic #datascience

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: