I've made a video on Pydantic already, but version 2 has since been released, so I thought I would come back to it! You can think of Pydantic as a supercharged dataclasses, with all sorts of functionality even attrs doesn't have. It's great for APIs too!
00:00 Intro
00:44 Installing Pydantic [1]
01:12 Creating models [2]
04:15 Validating inputs [3]
08:10 Using Pydantic with an API [45]
17:33 Outro
[1] https://docs.pydantic.dev/latest/install
[2] https://docs.pydantic.dev/latest/conc...
[3] https://docs.pydantic.dev/latest/conc...
[4] https:://www.gov.uk/bankholidays.json
[5] https://docs.pydantic.dev/latest/api/...
—
If you want to see more of me, join my Discord server!
/ discord
I get a lot of people asking, so here's my setup!
• Visual Studio Code: • My Visual Studio Code setup! (2024)
• Terminal: • Make your terminal look AMAZING
• Desk/recording gear: https://kit.co/Carberra
• PC build: https://uk.pcpartpicker.com/list/TmzGYN
Affiliations (I may earn a commission):
• Codecrafters 40% off any plan: https://app.codecrafters.io/join?via=...
• Keeper Password Manager 30% off your first year: https://keeper.io/r/EX4FB1C
—
If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.
#python #coding #howto