title: SQL Parsing library for Python
body: <p>We need a SQL parsing or decomposing library for Python.  We would like to be able to input a SQL text query and then get the query parts back as a result.  It doesn't need to be fancy, or anything, but we <em>would</em> like to avoid doing the parsing ourselves.  Ideally, we could do something like:</p>
  
  <pre><code>the_query = "select something from some_table where blah = 'thing' limit 15"
  query_parts = the_library.parse(the_query)
  print query_parts.limit().val()
  
  &gt;&gt;&gt; '15'
  </code></pre>
  
  <p>And this, too:</p>
  
  <pre><code>the_query = "select something from some_table where blah = 'thing'"
  query_parts = the_library.parse(the_query)
  print query_parts.limit().val()
  
  &gt;&gt;&gt; None
  </code></pre>
  
  <p>Can anyone give us any pointers for this?  If the functionality is more limited, that's OK as well.</p>
  
  <p>Thanks a lot!</p>