mysql - How to get column names of a schema in sqlsoup in python? -


how column names , types in dictionary schema/table using sqlsoup in python? mysqldb can create cursor , use cursor.description. there equivalent sqlsoup?

according documentation:

a table object can instructed load information corresponding database schema object existing within database. process called reflection. in simple case need specify table name, metadata object, , autoload=true flag. if metadata not persistently bound, add autoload_with argument:

>>> messages = table('messages', meta, autoload=true, autoload_with=engine) >>> [c.name c in messages.columns] ['message_id', 'message_name', 'date'] 

Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -