Paul's Programming Notes     Archive     Feed     Github

SQLalchemy - Simple Select Query

from sqlalchemy import create_engine, MetaData, Table

engine = create_engine('sqlite:///cars.db', echo=False)
metadata = MetaData(bind=engine)

table = Table('cars', metadata)
stmt = table.select()
for row in stmt.execute():
    print row