On the other hand, I might just only query the columns I am interested in the first place, like this:

```
for id, hostname in db.session.query(Agent.id, Agent.hostname):
    out.append({'id': id, 'hostname' : hostname})
```