wfexs_backend.utils.io_wrappers
#
Module Contents#
Classes#
This class is used to compute the digestion of the read bytes of a stream on the fly |
|
This class is used to compute the digestion of the read bytes of a stream on the fly |
|
This class is used to compute the MIME type of a stream on the fly |
|
This class is used to provide chunked uploads from a stream |
|
This implementation is slightly inspired on https://stackoverflow.com/a/77323411 |
API#
- class wfexs_backend.utils.io_wrappers.AbstractProxyIOWrapper(stream: IO[bytes] | io.RawIOBase)#
Bases:
io.RawIOBase
This class is used to compute the digestion of the read bytes of a stream on the fly
Initialization
Initialize self. See help(type(self)) for accurate signature.
- class wfexs_backend.utils.io_wrappers.DigestIOWrapper(stream: IO[bytes] | io.RawIOBase, algo: str = 'sha256')#
Bases:
wfexs_backend.utils.io_wrappers.AbstractProxyIOWrapper
This class is used to compute the digestion of the read bytes of a stream on the fly
Initialization
Initialize self. See help(type(self)) for accurate signature.
- class wfexs_backend.utils.io_wrappers.MIMETypeIOWrapper(stream: IO[bytes] | io.RawIOBase)#
Bases:
wfexs_backend.utils.io_wrappers.AbstractProxyIOWrapper
This class is used to compute the MIME type of a stream on the fly
Initialization
Initialize self. See help(type(self)) for accurate signature.
- class wfexs_backend.utils.io_wrappers.LimitedStreamIOWrapper(stream: IO[bytes] | io.RawIOBase, maxreadsize: int)#
Bases:
wfexs_backend.utils.io_wrappers.AbstractProxyIOWrapper
This class is used to provide chunked uploads from a stream
Initialization
Initialize self. See help(type(self)) for accurate signature.
- class wfexs_backend.utils.io_wrappers.MultipartFile#
Bases:
typing.NamedTuple
- class wfexs_backend.utils.io_wrappers.MultipartEncoderIOWrapper(fields: Sequence[Tuple[str, Sequence[str | MultipartFile]]], boundary: str | None = None)#
Bases:
io.RawIOBase
This implementation is slightly inspired on https://stackoverflow.com/a/77323411
Initialization
Initialize self. See help(type(self)) for accurate signature.
- _set_fields(fields: Sequence[Tuple[str, Sequence[str | MultipartFile]]]) None #