title: SqlAlchemy getting model name from object
body: <p>I have an object that I'm passing to a queue to write to a database. I need to perform some logic checks to handle errors:</p>
  
  <p>How can I check to see which model that object is? </p>
  
  <pre><code>c = Candidate(....)
  
  type(c)
  &lt;class 'models.Candidate'&gt;
  </code></pre>
  
  <p>is there anyway I can access <code>Candidates</code> in an <code>if</code> statement? </p>
  
  <pre><code>if type(c)... == 'Candidate':
  </code></pre>
  
  <p>I realize I can just do:</p>
  
  <p><code>if type(c) == &lt;class 'models.Candidate'&gt;</code> but didn't know if there was a cleaner way</p>