Query Class In Python Example