Replacing Django's ORM with SQLAlchemy