def printSchema(connection):
    for tableName, in connection.execute(
        """
        select NAME from SQLITE_MASTER where TYPE='table' order by NAME;
        """
        ):
        print('{}:'.format(tableName))
for columnID, columnName, columnType, columnNotNull, columnDefault, columnPK in connection.execute(
    "pragma table_info('{}');".format(tableName)):
    print('  {id}: {name}({type}){null}{default}{pk}'.format(id=columnID,
        name=columnName, type=columnType, null=' not null' if columnNotNull
         else '', default=' [{}]'.format(columnDefault) if columnDefault else
        '', pk=' *{}'.format(columnPK) if columnPK else ''))
Есть ли способ получить схему базы данных из Python?