title: Flask-SQLAlchemy - retrieve Query.all() - All column in each row
body: <p>I'm running a Flask app with flask_SQLAlchemy and Postgres DB.</p>
  
  <p>I want to print() all columns values for a row retrieved with query.all()</p>
  
  <p>I've read over this document, but I was not able to retrieve what I'm looking for. <a href="https://docs.sqlalchemy.org/en/13/orm/query.html" rel="nofollow noreferrer">https://docs.sqlalchemy.org/en/13/orm/query.html</a> 
  I'm new to Alchemy though.</p>
  
  <pre><code># the class model
  class Users(db.Model):
      __tablename__ = "users"
      id = db.Column(db.Integer, primary_key=True)
      username = db.Column(db.String, nullable=False)
      hash = db.Column(db.String, nullable=False)
      reg_date = db.Column(db.DateTime, nullable=False)
      enabled = db.Column(db.Boolean, nullable=False
  
  # Query all users
  users = Users.query.all()
  
  # try to iterate
  for row in users:
      print(row.all())
  </code></pre>
  
  <pre><code>actual results:
  before loop: 
      &gt;&gt;&gt; &lt;Users 1&gt;, &lt;Users 2&gt;, &lt;Users 3&gt;, &lt;Users 4&gt;
  after loop: 
      &gt;&gt;&gt; error all() doesn't apply to row
  
  expected result, not achieved:
      &gt;&gt;&gt;
      {id="1", username="yyy", hash="xxx", reg_date"zzz", enabled"yyy"}   
      ....
      {id="n", username="ttt", hash="nnn", reg_date"jjjj", enabled"oooo"}
  </code></pre>