▲ | gostsamo 4 days ago | |||||||
I'm sure that the pydantic guys had a reason to rename .dict to .model_dump. This single change caused so much grieve when upgrading to pydantic2.1 The very idea of unnecessary breaking changes is a big reason not to over rely on pydantic, tbh. 1 we were using .dict to introduce pydantic in the mix of other entity schemes and handling this change later was a significant pain in the neck. Some python introspection mechanism that can facilitate deep object recasting might've been nice if possible. | ||||||||
▲ | jmogly 4 days ago | parent | next [-] | |||||||
Haha, ChatGPT recommends this: from pydantic import BaseModel class MyModel(BaseModel): name: str
| ||||||||
| ||||||||
▲ | the__alchemist 4 days ago | parent | prev [-] | |||||||
Representing structured data as key/value pairs is a pattern I've only seen in Python, and don't understand why it became popular and canonical. | ||||||||
|