title: What type is used to store byte strings in SQLAlchemy?
body: <p>I'm trying to store byte strings in a PostgreSQL database using SQLAlchemy.</p>
  
  <p>My model looks like this:</p>
  
  <pre><code>class UserAccount(db.Model):
      id = db.Column(db.Integer, primary_key=True)
      username = db.Column(db.String)
      password_hash = db.Column(db.String)
      password_salt = db.Column(db.String)
  </code></pre>
  
  <p>I want <code>password_hash</code> and <code>password_salt</code> to both be byte strings (i.e. str, since I'm using Python 2.7), but even if I pass bytes into it, SQLAlchemy seems to turn them into unicode. I've also tried using <code>convert_unicode=False</code> in the model, but I get the same result.</p>
  
  <p>What do I use to store bytes in a SQLAlchemy model?</p>