2 ms·
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.
by mixmastamyk 6y ago
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.
- polyrand 6y agoI 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.