Pydantic Crash Course
HTML-код
- Опубликовано: 31 окт 2022
- In this crash course we're going to be checking out the Pydantic library. Which has gained similar popularity to that of FastAPI.
👨💻 Looking for a web developer job, visit: www.webdevjobs.io/
👽 Discord - / discord
🔴 - If you enjoyed this video. Please leave a like and subscribe :)
Do some express typescript sir
Great tutorial about Pydantic 🤘, awesome as always Fransis
Taghi!! Thank you bro!
Very helpful video! thanks for making 👍
You're more than welcome :)
Great crash course!
You are more than welcome!!
Optional[level] seems like optional but it is actually not optional, it gives `None` if no value is specified during initialization
instead of Optional we can use `Union[Level, None]` or `Level | None` (in >= python3.10)
Isn't this how optional values are defined in Python callable signatures? By supplying some default value, often None? :)
PydanticDeprecatedSince20:
Pydantic V1 style `@validator` validators are deprecated.
You should migrate to Pydantic V2 style `@field_validator` validators
applying print function on `values` gives `ValidationInfo` instance.
from there `values.data` can be used to get the values as dict.
level: Optional[Level] = None
Great video! I am looking forward to pydantic 2. Another things I like is the @validate_arguments decorator.