GitHub

BytesFile

API reference for BytesFile.

A FileLike holding its content.

Attributes

AttributeTypeDescription
contentbytes
namestr
content_typestr = ''
last_modifieddatetime = datetime(1970, 1, 1, tzinfo=UTC)
sizeint

Functions

__init__

__init__(content, name, content_type='', last_modified=datetime(1970, 1, 1, tzinfo=UTC)) -> None
ParameterTypeDescription
contentbytes
namestr
content_typestr = ''
last_modifieddatetime = datetime(1970, 1, 1, tzinfo=UTC)

stream

stream() -> Stream[bytes, object]

Returns Stream[bytes, object]

def stream(self) -> Stream[bytes, object]:
    return succeed_stream(self.content)