Pydantic V2 - Full Course - Learn the BEST Library for Data Validation and Parsing
Vložit
- čas přidán 11. 07. 2024
- Unlock the power of Pydantic V2 with this comprehensive course tailored for both beginners and seasoned developers. Dive deep into the world of data validation and parsing, and discover why Pydantic is one of the most influational Libraries in the Python Economy.
Code: github.com/Coding-Crashkurse/...
Timestamps
Introduction: 0:00
Basics: 0:34
Nested models: 4:52
Additional Parsers: 6:43
Field Validators: 9:47
Model Validators: 12:00
The Field class: 15:30
Computed Fields: 19:15
Dataclasses with Pydantic: 20:57
Strict Mode: 22:42
Pydantic Settings: 24:09
Hands down the best 30 minutes invested on Learning Python : Huge fan of your teaching method!
Thank you very much :)
Very helpful. Thanks!
Finally there is someone who introduces pydantic v2
Great video! Nothing superfluous, everything is clear. Good examples
Coming from typescript ecosystem where I'm using packages like Zod to do basically the same things, it is nice to see python has this gem, too
Extra thank-you for pydantic-settings!
Nice! Much needed walk through
great it´s useful for you :-)
Very nice video on Pydantic. Thanks you so much.
Thank you for your nice comment:)
Thank you, it came at a great hour! I'm having problems, I'm creating an application that receives a dictionary from a request and then trying to convert it to a structure that the 'convert_pydantic_to_openai_function' method accepts, but it's difficult! Doing it statically by declaring it like: """class Tagging(BaseModel):
title: str = Field(description="Write a title")
...""" and than using "convert_pydantic_to_openai_function(Tagging)
Everything goes well, but when I try to convert the dictionary dynamically to fields such as 'title' mentioned, the problem arises, would you know how to do this conversion properly? So I could pass it on to AI dynamically to process the fields that the user provided in the request!
Ok that is an interested idea. I would probably try to create a class with no attributes attached. Allow extra_attributes and set these attributes AFTEr instantiation. May that be a solution?
Ohh man i wish i knew about computed value already! Thats a life safer
Yep, one of my favorite features too :)
Thanks for the video. I’m currently very stuck on the concept of using multiple embeddings or vector indexes vs metadata / knowledge graph. My use case is simple: I have a text of a journal written roughly in chronological sequence. Embedding functions take into account the lexical meaning of words and their approx distance to each other, but not smart enough to allow something like “chapter 3 starts in 1872, so following day/month references like March 4, should have a closer cosine distance to 1827 than “March 4, 1824”.
Is it possible to create a low dimensional embedding vector that represents sequence in the document or rough chronological distance to each other?
I will pay $10 to anyone who is able to give me insight on this!
I would try to have a look if SelfQueryRetrievers, if you use Langchain
Validierung without Pydantic :D Language validation failed :D
:p