class documentation

class FileWrapper: (source)

View In Hierarchy

This class can be used to convert a :class:`file`-like object into an iterable. It yields `buffer_size` blocks until the file is fully read. You should not use this class directly but rather use the :func:`wrap_file` function that uses the WSGI server's file wrapper support if it's available. .. versionadded:: 0.5 If you're using this object together with a :class:`Response` you have to use the `direct_passthrough` mode. :param file: a :class:`file`-like object with a :meth:`~file.read` method. :param buffer_size: number of bytes for one iteration.

Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Method close Undocumented
Method seek Undocumented
Method seekable Undocumented
Method tell Undocumented
Instance Variable buffer_size Undocumented
Instance Variable file Undocumented
def __init__(self, file: t.IO[bytes], buffer_size: int = 8192): (source)

Undocumented

def __iter__(self) -> FileWrapper: (source)

Undocumented

def __next__(self) -> bytes: (source)

Undocumented

def close(self): (source)

Undocumented

def seek(self, *args: t.Any): (source)

Undocumented

def seekable(self) -> bool: (source)

Undocumented

def tell(self) -> t.Optional[int]: (source)

Undocumented

buffer_size = (source)

Undocumented

Undocumented