Chapter A.7. Migrating a Project to SQLAlchemy

Using ActiveMapper, it is not too difficult to migrate a typical project from SQL-Object to SQLAlchemy. Some transformations are required to move from SQLObject to SQLAlchemy:

  1. Database configuration in the deployment config file

  2. Identity configuration in the application config file

  3. Class definitions in your project’s model.py file

  4. Calls to bySomeColumn(SomeValue) need to change to get_by(SomeColumn=SomeValue)

  5. Changes to your queries

This section is not an exhaustive guide to migrating a project to SQLAlchemy, but it should help you along the way. All the most common SQLObject features are represented. It might seem like there are many steps to go through in the coming sections, but the translation ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.