title: How to manually escape SQL literals in Python
body: <p>I'm attempting to write a very high level query builder specific to my application. I'm currently using psycopg2 which doesn't seem to have a way to escape one literal without it being part of a larger, already written query.</p>
  
  <p>Is there a generic module for doing this? I don't seem to have many (if any) options.</p>