How to delete multiple rows with SQLAlchemy ORM

I got pretty frustrated trying to figure this out earlier. The documentation was helpful to a point, but I couldn’t find any good examples online that really illustrated how to delete multiple rows in SQLAlchemy the correct way with ORM. What I mean by this is, not selecting the rows you want to delete and … Read more

FastAPI + SQLAlchemy Tutorial

The code for this article can be found on my GitHub: https://github.com/jmgraff/fastapi-sqlalchemy-sqlite-example FastAPI has made creating an API for your app incredibly simple. SQLAlchemy has also done the same for interacting with databases. Using both of them together makes it very simple to have your API store and retrieve data from a number of different … Read more

SQLAlchemy PostgreSQL Tutorial

The source code for this tutorial can be found on my GitHub: https://github.com/jmgraff/sqlalchemy-postgres-crud-example This article will go over a simple example of how to use SQLAlchemy with PostgreSQL. You’re encouraged to clone the repository and run the example yourself. Once you’re familiar with how everything works, try modifying the main.py file by making your own … Read more