|
|
|
|
|
by sametmax
1017 days ago
|
|
I used to be a strong proponent of this, but I tend to use dataclasses more and more with time. Still use a lot of dicts, lists, and sets, but mostly as collections, rarely to hold one single element data. It came naturally, not out of some design, but I guess having better and better typing support everywhere makes it more and more convenient. |
|
I usually would prefer having everything behind the endpoint (such as Pydantic schemas & FastAPI) as simple dicts and lists.