Fast API Tutorial, Part 9: Body - Nested Models

preview_player
Показать описание
We now have a decent idea of how to handle and display request body parameters. Sometimes, though, data doesn't come in as a neatly-formed single JSON object/dictionary.

In this video we will see how you can handle nested data in your request body.

Рекомендации по теме
Комментарии
Автор

Thanks for educational material provided. Very explicit and clear.

Hanson-em
Автор

Thank you very much for the great video, I have picked up FastAPI thru your tutorial! Thanks

philipwong
Автор

4:39 as of5/19/2024 list[str] = [] won't directly convert int [5, 8, ...] to strings. it will now throw an error unless declared as string, i.e., ["5", "8", "Hello"] ...Well, that's how it is for me when trying this out currently. Following the above tutorial at this time is throwing me an error 422. But with list[int] = ["5", "8"], it is able to convert the stringed numbers to int. 19:33 regex is no longer used, instead, use "pattern".

rainerpavletic
Автор

(6:55) list and set worked only with int, with str output was 422, Unprocessable Entity

ram_qr
Автор

thanks for your hard work!
I have a fun error trying this: " 'regex' is removed, use 'pattern' instead, code='removed-kwargs' "
Some dev finally agreed that regex is Evil and must be eradicated? 🤣🤣

baptistegiannesini