title: How do you update a SQLAlchemy RowProxy?
body: <p>I'm working with the SQLAlchemy Expression Language (not the ORM), and I'm trying to figure out how to update a query result.</p>
  
  <p>I've discovered that RowProxy objects don't support assignment, throwing an <code>AttributeError</code> instead:</p>
  
  <pre><code># Get a row from the table
  row = engine.execute(mytable.select().limit(1)).fetchone()
  
  # Check that `foo` exists on the row
  assert row.foo is None
  
  # Try to update `foo`
  row.foo = "bar"
  
  AttributeError: 'RowProxy' object has no attribute 'foo'
  </code></pre>
  
  <p>I've found <a href="https://stackoverflow.com/questions/14307238/updating-row-in-sqlalchemy-orm">this solution</a>, which makes use of the ORM, but I'm specifically looking to use the Expression Language.</p>
  
  <p>I've also found <a href="https://stackoverflow.com/questions/10588375/can-i-assign-values-in-rowproxy-using-the-sqlalchemy">this solution</a>, which converts the row to a dict and updates the dict, but that seems like a hacky workaround.</p>
  
  <p><strong>So I have a few questions:</strong></p>
  
  <ul>
  <li>Is this in fact the only way to do it?</li>
  <li>Moreover, is this the <em>recommended</em> way to do it?</li>
  <li>And lastly, the lack of documentation made me wonder: am I just misusing SQLAlchemy by trying to do this?</li>
  </ul>