def write(self, data):
    self._check_open()
    if not isinstance(data, str):
      raise TypeError('Expected str but got %s.' % type(data))
    if not data:
      return
    self._buffer.append(data)
    self._buffered += len(data)
    self._offset += len(data)
    if self._buffered >= self._blocksize:
      self._flush()
Write some bytes.
dataset/ETHPy150Open GoogleCloudPlatform/billing-export-python/cloudstorage/storage_api.py/StreamingBuffer.write