Skip to content Skip to sidebar Skip to footer
Showing posts with the label Pydantic

Can I Create A Unix Time Type Which Automatically Converts To Datetime In Pydantic?

I receive a JSON response like with a unix timestamp, e.g.: {'protocol': 'http', &#… Read more Can I Create A Unix Time Type Which Automatically Converts To Datetime In Pydantic?

Pydantic Does Not Validate When Assigning A Number To A String

When assigning an incorrect attribute to a Pydantic model field, no validation error occurs. from p… Read more Pydantic Does Not Validate When Assigning A Number To A String

Python Type Hinting: Function Return Type, Given As Argument, But Type Is Generic Alias Like Union

We can specify easily return type of function, even if type we expect is provided as one of it'… Read more Python Type Hinting: Function Return Type, Given As Argument, But Type Is Generic Alias Like Union

Pydantic Does Not Validate When Assigning A Number To A String

When assigning an incorrect attribute to a Pydantic model field, no validation error occurs. from p… Read more Pydantic Does Not Validate When Assigning A Number To A String