title: Is there a way to get a schema of a database from within python?
body: <p>I'm trying to find out a way to find the names of tables in a database(if any exist).  I find that from a sqlite cli I can use:</p>
  
  <pre><code>&gt;.tables
  </code></pre>
  
  <p>Then for the fields:</p>
  
  <pre><code>&gt;PRAGMA TABLE_INFO(table_name)
  </code></pre>
  
  <p>This obviously doesn't work within python.  Is there even a way to do this with python or should I just be using the sqlite command-line?</p>