'ApiBinaryStream constructor.
Args:
filename: A file name to be used by the browser when user downloads the
file.
content_generator: A generator that yields byte chunks (of any size) to
be streamed to the user.
content_length: The length of the stream, if known upfront.
Raises:
ValueError: if content_generator is None.'

def __init__(self, filename, content_generator=None, content_length=None):

    self.filename = filename
    self.content_length = content_length
    if (content_generator is None):
        raise ValueError("content_generator    can't    be    None")
    self.content_generator = content_generator
