def main(client):
  # Initialize appropriate service.
  creative_wrapper_service = client.GetService('CreativeWrapperService',
                                               version='v201511')

  # Create a filter statement.
  statement = dfp.FilterStatement()

  # Get creative wrappers by statement.
  while True:
    response = creative_wrapper_service.getCreativeWrappersByStatement(
        statement.ToStatement())
    if 'results' in response:
      # Display results.
      for creative_wrapper in response['results']:
        print ('Creative wrapper with ID \'%s\' applying to label \'%s\' was '
               'found.' % (creative_wrapper['id'], creative_wrapper['labelId']))
      statement.offset += dfp.SUGGESTED_PAGE_LIMIT
    else:
      break

  print '\nNumber of results found: %s' % response['totalResultSetSize']
dataset/ETHPy150Open googleads/googleads-python-lib/examples/dfp/v201511/creative_wrapper_service/get_all_creative_wrappers.py/main/original