Tuesday, February 27, 2007

Turbogears and SQLAlchemy with SQLSoup

Finnaly, I have a chance to try Turbogears with sqlalchemy last night.
I used a fresh instalation, python 2.4.1 on windows, and a python extentions on windows.
Then I used an "offline instalation method" for TG installation, basically I download all the TG requirement files, and using my own batch file to install it.
Then I install the SQLAlchemy manualy from egg file.

so next I create a TG Project, and add

from turbogears.database import metadata, session
from sqlalchemy.ext.sqlsoup import SqlSoup

db = SqlSoup(metadata)

then I test it with tg-admin shell

woaaaaa I can get all my legacy data with that soup ...


see, with this format db.., i can access all my legacy data, no more creating class

but I guess, I has to make an impact somehow, I hope not the performance.
cause I will use an assign_mapper function with this one

No comments: