I'm building a flask application and need an dict from my database model. The query should filter by user_ids and only query a few rows. I guess the best way is to filter the rows and the use the internal __dict__
object to return my dict. Currently I know how to filter by ids, but I have no idea how to select specific rows. Users.query.filter(Users.id.in_(user_ids)).all()
the array of rows looks like
rows = ["username", "role", "last_seen"]
any ideas how to do that?