FastAPI and Pydantic - Model Classes and Nested Models
▶️ Playlist: https://www.youtube.com/playlist?list=PL-2EBeDYMIbTJrr9qaedn3K_5oe0l4krY
In this video, we'll see how we can use Pydantic models in a FastAPI app, and use these models as type-hints on our handler functions.
This allows us to validate data and to generate useful schemas in our API docs.
We'll also see how to work with nested data - by adding an Album model and a reference to a list of albums on the parent Band model.
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes
▶️ Full Playlist: https://www.youtube.com/playlist?list=PL-2EBeDYMIbTJrr9qaedn3K_5oe0l4krY
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter: https://twitter.com/bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
FastAPI + Pydantic: https://fastapi.tiangolo.com/python-types/#pydantic-models
#python #fastapi #webdevelopment