Pydantic Introduction - Models, Fields, Constrained Types, Validator Functions and Model Exports

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 ๐Ÿ“š ๐—™๐˜‚๐—ฟ๐˜๐—ต๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—ฎ๐—ป๐—ฑ ๐—ถ๐—ป๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป: 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

Pydantic - Nested Models, JSON Schema and Auto-Generating Models with datamodel-code-generator
โ–ถ๏ธŽ

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

Python Pydantic Tutorial: Complete Data Validation Course (Used by FastAPI)
โ–ถ๏ธŽ

Python Pydantic Tutorial: Complete Data Validation Course (Used by FastAPI)

Filling the Test Automation Gaps with AI โ€“ Lessons from the ISTQB Glossary Project
โ–ถ๏ธŽ

Filling the Test Automation Gaps with AI โ€“ Lessons from the ISTQB Glossary Project

Pydantic Crash Course - Build Reliable Python & AI Applications
โ–ถ๏ธŽ

Pydantic Crash Course - Build Reliable Python & AI Applications

Pydantic - Field Customization, Advanced Data Exports and Model Config classes
โ–ถ๏ธŽ

Pydantic - Field Customization, Advanced Data Exports and Model Config classes

Why Python Needs Pydantic for Real Applications
โ–ถ๏ธŽ

Why Python Needs Pydantic for Real Applications

Pydantic Tutorial โ€ข Solving Python's Biggest Problem
โ–ถ๏ธŽ

Pydantic Tutorial โ€ข Solving Python's Biggest Problem

FastAPI and Pydantic - Model Classes and Nested Models
โ–ถ๏ธŽ

FastAPI and Pydantic - Model Classes and Nested Models

๐Ÿ’ปPydantic Tutorial for Beginners: Enhance Your Data Validation Skills
โ–ถ๏ธŽ

๐Ÿ’ปPydantic Tutorial for Beginners: Enhance Your Data Validation Skills

Intro to Pydantic V1
โ–ถ๏ธŽ

Intro to Pydantic V1

Pydantic - Validators (Root Validators, Pre-Item Validators, Each-Item Validators)
โ–ถ๏ธŽ

Pydantic - Validators (Root Validators, Pre-Item Validators, Each-Item Validators)

Do We Still Need Dataclasses? // PYDANTIC Tutorial
โ–ถ๏ธŽ

Do We Still Need Dataclasses? // PYDANTIC Tutorial

Python Tutorial: Type Hinting vs Type Checking vs Data Validation - Whatโ€™s the Difference?
โ–ถ๏ธŽ

Python Tutorial: Type Hinting vs Type Checking vs Data Validation - Whatโ€™s the Difference?

Pydantic Crash Course
โ–ถ๏ธŽ

Pydantic Crash Course

Litestar for Python API Development / Pydantic Model Integration
โ–ถ๏ธŽ

Litestar for Python API Development / Pydantic Model Integration

Please Learn How To Write Tests in Pythonโ€ฆ โ€ข Pytest Tutorial
โ–ถ๏ธŽ

Please Learn How To Write Tests in Pythonโ€ฆ โ€ข Pytest Tutorial

Polars - An Introduction to Polars v1 for Python Data Analytics!
โ–ถ๏ธŽ

Polars - An Introduction to Polars v1 for Python Data Analytics!

Building a CLI Tool | Scraping & Processing Data with BeautifulSoup, Requests & Pydantic
โ–ถ๏ธŽ

Building a CLI Tool | Scraping & Processing Data with BeautifulSoup, Requests & Pydantic

1-LangGraph Tutorial-Getting Started With Pydantic-Data Validations
โ–ถ๏ธŽ

1-LangGraph Tutorial-Getting Started With Pydantic-Data Validations

Attrs, Pydantic, or Python Data Classes?
โ–ถ๏ธŽ

Attrs, Pydantic, or Python Data Classes?