Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

here's my attempt at unifying SQLAlchemy and Pydantic. I use the new dataclasses support in both libraries to do this.

https://gist.github.com/sandys/671b8b86ba913e6436d4cb22d04b1...

This example trys to play with some quirky table structures - Mixins, Surrogate primary keys, index, etc

Both async and sync modes.

I like what @tiangolo has done with SQLModel, but i suspect that a lot of people who are already using sqlalchemy in production will prefer to unify via dataclasses versus switching the DX to a new library.

And this is possible today.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: