Re:12 requests per second: A realistic look at Python web fr...
by mixmastamyk on Friday February 19, 2021 @03:00PM
(#26197358)
Do you need to define your models more than once with these? I'm looking for a single source solution and haven't quite found it yet.
[ Parent
| on HN ]
Re:12 requests per second: A realistic look at Python web fr...
by polyrand on Friday February 19, 2021 @06:04PM
(#26199227)
I only define them once, but I define all the database schema by hand (with an SQL script). Iād love to have something that translates Pydantic to an SQL schema definition.
Each asyncpg result has a dictionary-like interface, so I can convert it to a Pydantic model easily.