Hacker News new | ask | show | jobs
by luckycharms810 98 days ago
As a non ORM person - I do love the Pydantic functionality that comes out of the box w pyscopg3.

https://www.psycopg.org/psycopg3/docs/advanced/typing.html#e...

3 comments

Oh this is super cool. Coming from Java I've long missed JDBI and Rosetta which makes writing SQL Queries in Java a dream. I've toyed around with a similar style interface for python, and looking at this give me hope I can achieve it.
wow big if true. our core codebase is still on psycopg2 and we do this mapping ourselves. type introspective would be very handy for reducing that boilerplate.
I mean it would work with attrs and dataclasses as well and you'd also get static type checking and they are faster.