Tag Archives: SqlAlchemy

Another Step-by-Step SqlAlchemy Tutorial (part 2 of 2)

In the first part of this series, we went over what some might call the “SQL Expression” method of using SqlAlchemy to interact with your database. The theory behind this is that we should learn the less abstract way of doing things before we get to the higher level (and more abstract) methods. This is true in many math classes, like Calculus where you learn the long way to find the standard deviation of some calulation before you learn about the shortcut.

For the second half, we will be doing what some might say is the easy way to use SqlAlchemy. It is known as the “Object Relational” method and the official documentation actually starts with it. This methodology takes a little longer to set up initially, but in many ways, it is also much easier to follow. Continue reading Another Step-by-Step SqlAlchemy Tutorial (part 2 of 2)

Another Step-by-Step SqlAlchemy Tutorial (part 1 of 2)

A long time ago (circa 2007 if Google serves me right), there was a Python programmer named Robin Munn who wrote a really nice tutorial on SqlAlchemy. It was originally based on the 0.1 release, but updated for the newer 0.2. Then, Mr. Munn just disappeared and the tutorial was never updated. I have been kicking around the idea of releasing my own version of this tutorial for quite some time and finally decided to just do it. I hope you will find this article helpful as I found the original to be. Continue reading Another Step-by-Step SqlAlchemy Tutorial (part 1 of 2)