Search code examples
pythonormwerkzeug

Werkzeug without ORM


How do I use the Werkzeug framework without any ORM like SQLAlchemy? In my case, it's a lot of effort to rewrite all the tables and columns in SQLAlchemy from existing tables & data.

How do I query the database and make an object from the database output?

In my case now, I use Oracle with cx_Oracle. If you have a solution for MySQL, too, please mention it.

Thanks.


Solution

  • maybe this is what i looking for http://www.sqlalchemy.org/trac/wiki/SqlSoup and ht*p://spyced.blogspot.com/2006/04/introducing-sqlsoup.html

    so i don't have to declare the table to get the object

    rp = db.bind.execute('select * from mupp') a = rp.fetchall() a[0].name

    that's great...thanks for all inspiring response