title: How to check if PostgreSQL schema exists using SQLAlchemy?
body: <p>I am using SQLAlchemy to generate tables in a specific schema in a PostgreSQL database. If the schema does not exist, I want to create it. I know the PostgreSQL query to check for the existence of the schema:</p>
  
  <pre><code>SELECT exists(select schema_name FROM information_schema.schemata WHERE schema_name = 'foo')
  </code></pre>
  
  <p>but I want to know how I should handle this using SQLAlchemy. </p>