Use [max()](http://docs.sqlalchemy.org/en/latest/core/functions.html#sqlalchemy.sql.functions.max)

```
from sqlalchemy import func # top of module
version, = db.session.query(func.max(JobTypeVersion.version)).first()
```