SQLalchemy vs Psycopg3

Posted by aronzskv@reddit | Python | View on Reddit | 85 comments

So I am currently in the process of building my business dashboard, where the backend is fully written in Python. Now that I have some parts functioning properly I am in the process of migrating all the databases from mongodb to postgres (I used to hate sql and mongodb was easy to use, but Im starting to realise sql is quite useful in the current use case). Now the tables are all set up, but I am not sure what package to use in the backend code, mainly Psycopg3 or SQLalchemy. I know SQL and can write it easily, but the abstractions with SQLalchemy might give additional security features with the way it works, but building all the models and repos will also be a pain in the ass lol.

Does anyone have experience or recommendations on which to use?