labapi.entry.attachment.NamedBinaryIO#

class labapi.entry.attachment.NamedBinaryIO(*args, **kwargs)[source]#

Bases: Protocol

Binary file-like object with a name attribute.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

close()

Close the stream.

read([size])

Read bytes from the stream.

seek(offset[, whence])

Move the stream cursor.

seekable()

Return whether the stream supports random access.

tell()

Return the current stream cursor position.

write(data, /)

Write bytes to the stream.

Attributes

name

Return the local filename for this stream.

property name: str#

Return the local filename for this stream.

read(size: int = -1, /) bytes[source]#

Read bytes from the stream.

write(data: Buffer, /) int[source]#

Write bytes to the stream.

seek(offset: int, whence: int = 0, /) int[source]#

Move the stream cursor.

tell() int[source]#

Return the current stream cursor position.

close() None[source]#

Close the stream.

seekable() bool[source]#

Return whether the stream supports random access.