Basic json -> sqlalchemy query builder