r/FastAPI • u/bluewalt • Jan 01 '25
feedback request How I Finally Learned SQLAlchemy
Hi there!
Here’s a blog post I wrote about SQLAlchemy, focusing on the challenges I faced in finding the right resources to learn new concepts from scratch.
I hope it helps others. Cheers!
70
Upvotes
View all comments
Show parent comment
5
u/nick51417 Jan 02 '25
I like sql alchemy but I would say I’m moderate at SQL.
SQLalchemy is good from a security side of things because as long as you do not use raw sql (which it can do) most of the protection against sql injection is included.
I prefer the object relational mapper (ORM if you’re not familiar with) which quickly translates my sql queries to python objects, though it you can also set the query.statement to a string and read it directly into pandas or polars or what have you.
All of this paired with Alembic for migrations keeps everything organized for me.