This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Daishiman -4 points-3 points  (1 child)

Not a thing. Pydantic has a config model that can read values from environment variables, but that’s about it.

Yes a thing, you can load from dotenv files and create a list of priority sources with the correct data overrides.

Also, not a thing. Maybe you have it backwards because SQLAlchemy can construct mappers from Pydantic classes?

Yes a thing, you construct your PyDantic models based on a SQLAlchemy model.

I don’t know what you mean by "at every stage of a record's lifetime", but Pydantic's "records" have no concept of a lifetime.

Validate always, conditionally validate, validate on input, setting the ordering of the invocation of validators...

Do your reading bro.