Python pydantic Introduction – Give your data classes super powers

preview_player
Показать описание
Want static type checking in run time? Want to use standard python type annotations? Want compatibility with standard python dataclasses?
Then it sounds like pydantic is something for you. This video is a getting started tutorial on pydantic and it's most important features while also hinting on what more advanced concepts you can continue with after you're more familiar with the library.

Sign up for my course:

Github repository with all the information you need:

Slides (with more links):

Watch more talks from me:

Index
00:00 Introduction
01:16 Outline of the lecture
02:15 Dataclasses, Refresher
04:52 pydantic, Quick introduction
05:46 pydantic, Runtime type-checking, data class drop-in replacement
07:14 pydantic, BaseModel and JSON
08:05 JSON (de)serialisation of objects and errors
10:28 JSONSchema
11:35 Custom Validators
14:17 Validators, type-checking function arguments
15:29 FastAPI, pydantic driven APIs, async ASGI support
16:43 That’s the beginning, but there’s more…
17:08 Features worth mentioning
19:45 Conclusion
20:30 Afterword and contact details
Рекомендации по теме
Комментарии
Автор

My friend and I agree that we both think you did this presentation with no pants on. I would love to hear your response.

Sockheadrps
Автор

Before go to bed and recover energies, I wanted to thank you very much for the information provided, it has helped me a lot related to apply Typing validations on runtime, Greetings from Peru and keep going!

grdo
Автор

I learned pydantic and pizza making as well. Thanks much.

vgsuresh
Автор

Great Overview learned something as Python begginer

oliverescoto
Автор

Nicely done! Very clear overview of Pydantic and some use cases. As a FastAPI user myself, nice to see the callout for it. Big kudos to the creators of the two projects!

ardenshackelford
Автор

whats was the name of the library for automatically generating tests?

andreihawke
Автор

Thanks for this tutorial!

How to validate on pydantic phone number in international format - "+1...." ?

DenisTabac
Автор

what is the estimated performance overhead when using pydantic (in particular as opposed to relying on static type checking)?

cristianbulgaru
Автор

Do you really cook pizza at 350-400 degrees C?

glabrouswashere
Автор

Thank you, it was really useful and interesting)

manchenkoff
Автор

stupid q. .. minus the validation checks. is using pandas directly, faster than employing pydantic?

tweydmn
Автор

Is there a way to inherit a pydantic Model but make all the fields optional for FastAPI? I have a User model which I'd like to have an update endpoint for, but I'd prefer not have to re-declare each field as Optionals and then change both Models with every change we make.

This may not be remotely related to the subject but I'm new to all of the technologies here, including Python, so sorry if this is a newby question.

patricksullivan
Автор

I thought I was watching deadpool preaching about python lol

keijioza