You could try creating an SQL class from the string you get, something like:
from psycopg.sql import SQL ... query = SQL(qb_obj.getFinalQuery()) await acur.execute(query) ...