filmov
tv
Pydantic - Nested Models, JSON Schema and Auto-Generating Models with datamodel-code-generator

Показать описание
In this video, we dive further into the Pydantic library in Python. This is based on the following blog post:
We'll learn a number of things, including:
* How to define nested Pydantic models, forming parent-child relationships that allow us to model complex data that contains relationships.
* Using typing.Literal to constrain values on a field
* Defining default values for fields
* Generating JSON Schema from Pydantic models
* Auto-generating Pydantic models from JSON Schema definitions
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
03:47 Adding new Pydantic model for nested data
05:19 Adding a link to nested model in parent Pydantic class
07:38 The effect of the Union type on a Pydantic field
10:29 Constraining field values with Python Literal type
12:53 Adding custom validator function to check list length
15:05 JSON Schema outputs with Pydantic models
18:46 Auto-generating Pydantic models from JSON Schema with datamodel-code-generator
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
▶️ Full Playlist:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#python #pydantic #datascience
We'll learn a number of things, including:
* How to define nested Pydantic models, forming parent-child relationships that allow us to model complex data that contains relationships.
* Using typing.Literal to constrain values on a field
* Defining default values for fields
* Generating JSON Schema from Pydantic models
* Auto-generating Pydantic models from JSON Schema definitions
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
03:47 Adding new Pydantic model for nested data
05:19 Adding a link to nested model in parent Pydantic class
07:38 The effect of the Union type on a Pydantic field
10:29 Constraining field values with Python Literal type
12:53 Adding custom validator function to check list length
15:05 JSON Schema outputs with Pydantic models
18:46 Auto-generating Pydantic models from JSON Schema with datamodel-code-generator
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
▶️ Full Playlist:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#python #pydantic #datascience
Pydantic - Nested Models, JSON Schema and Auto-Generating Models with datamodel-code-generator
FastAPI and Pydantic - Model Classes and Nested Models
Just Use Pydantic
Pydantic V2 - Full Course - Learn the BEST Library for Data Validation and Parsing
Pydantic Tutorial • Solving Python's Biggest Problem
Pydantic is all you need: Jason Liu
Python FastAPI Tutorial #16 FastAPI - Nested Models
Nested models | Part9 | FastAPI Tutorial 2023
Pydantic - Field Customization, Advanced Data Exports and Model Config classes
PyTest-Full-Stack TOOLBOX - 03 Pydantic DTS Nested models
Nested Select and Pydantic
Fast API Tutorial, Part 9: Body - Nested Models
Parsing data with Pydantic - A Python short by Michael Kennedy
Pydantic and Dataclasses - How to use nested data
Pydantic is STILL all you need: Jason Liu
Python JSON Serialization/Deserialization Made Easy!
Using Nested Models in FastAPI - FastAPI Python Tutorial :11 - iGnani Adda247
Pydantic: Making life easier with data validation — Bojan Miletic
Shredding deeply nested JSON, one vector at a time by Laurens Kuiper - DuckDB Labs
Pydantic Introduction - Models, Fields, Constrained Types, Validator Functions and Model Exports
Schema Validation with Pydantic: Part #11 Python API Course
Pydantic Performance Tips Talk Python to Me Ep.466
Pydantic - Validators (Root Validators, Pre-Item Validators, Each-Item Validators)
PYTHON : Python flatten multilevel/nested JSON
Комментарии