def delete_bucket_contents(self, oauth_token, bucket, directory=None,
                             file_regex=None):
    url = '%s/%s' % (BASE_URL, bucket)
    if directory:
      url = '%s?prefix=%s/' % (url, directory)
    logging.info('Deleting files from: ' + url)
    date = datetime.datetime.now()
    str_date = date.strftime('%b %d, %Y %H:%M:%S')
    result = urlfetch.fetch(
        url=url, headers={
            'Authorization': 'OAuth %s' % (oauth_token),
            'Date': str_date,
            'x-goog-project-id': self.project_id,
            'x-goog-api-version': API_VERSION})
    dom = minidom.parseString(result.content)
    keys = dom.getElementsByTagName('Key')
    for key_element in keys:
      key = self._get_text(key_element.childNodes)
      if file_regex and not re.match(file_regex, key):
        continue
      url = '%s/%s/%s' % (BASE_URL, bucket, key)
      logging.info('Deleting: %s', url)
      result = urlfetch.fetch(
          url=url, method=urlfetch.DELETE, headers={
              'Authorization': 'OAuth %s' % (oauth_token),
              'Date': str_date,
              'x-goog-project-id': self.project_id,
              'x-goog-api-version': API_VERSION})
Signs the given claims and produces a :class:`~jose.JWS`
dataset/ETHPy150Open googlearchive/compute-appengine-demo-suite-python/demo-suite/lib/google_cloud/cs.py/Cs.delete_bucket_contents--crossover with--dataset/ETHPy150Open Demonware/jose/jose.py/sign