We can use the variable _executed with the cursor object ie. cursor._executed

 cursor = connection.cursor()
 cursor.execute(sql, (params))
 print cursor._executed
 rows = cursor.fetchall()