In SQLITE database, if I need table meta details, I can run the following command
C:\\sqlite>sqlite3.exe sqlite2.db
SQLite version 3.7.15 2012-12-12 13:36:53
you can get a lot of details in the following way
from sqlalchemy import *
db_target = create_engine('sqlite:///C:\\Users\\asit\\workspace\\forum1\\src\\sqlite.db')
target_metadata = MetaData(db_target)
src_master_table = Table('forum_forum', src_metadata, autoload=True )
print src_master_table.columns._data
You can run arbitrary SQL statements with session.execute(), including that pragma statement.
The PRAGMA table_info(forum_forum)
statement returns a sequence of rows:
>>> res = session.execute("PRAGMA table_info(forum_forum)")
>>> res.keys()
[u'cid', u'name', u'type', u'notnull', u'dflt_value', u'pk']
>>> for row in res:
... print row
...
(0, u'id', u'integer', 0, None, 1)
(1, u'category_id', u'integer', 0, None, 0)
(2, u'name', u'varchar(100)', 1, None, 0)
(3, u'description', u'varchar(200)', 1, None, 0)
(4, u'locked', u'bool', 1, None, 0)