Question: I have simple question regarding SQLAlchemy, is it possible to get the rows from the result as scalars instead of tuples? In other words I want an equivalent to:

```
[i[0] for i in self.archive.query(IRTerm.term).distinct()]

```

Thank you

Answer: 
No built in way in SQLAlchemy, but with python it isn't too hard. The example you gave works fine. You can also do `map(itemgetter(0), query)` or `for value, in query:`.
Since 0.6.5 you can use `query.as_scalar` ([ref](http://docs.sqlalchemy.org/en/rel_0_7/orm/query.html#sqlalchemy.orm.query.Query.as_scalar)).