ResourceHandleProtocol

class lsst.resources.ResourceHandleProtocol(*args, **kwargs)

Bases: Protocol, Generic[U]

Defines the interface protocol that is compatible with children of BaseResourceHandle.

Any class that satisfies this protocol can be used in any context where a BaseResourceHandle is expected.

Attributes Summary

closed

isatty

mode

name

Methods Summary

close()

fileno()

flush()

read([size])

readable()

readline([size])

readlines([hint])

seek(offset[, whence])

seekable()

tell()

truncate([size])

writable()

write(b, /)

writelines(lines, /)

Attributes Documentation

closed
isatty
mode
name

Methods Documentation

abstract close() None
abstract fileno() int
abstract flush() None
abstract read(size: int = -1) U
abstract readable() bool
abstract readline(size: int = -1) U
abstract readlines(hint: int = -1) Iterable[U]
abstract seek(offset: int, whence: int = 0, /) int
abstract seekable() bool
abstract tell() int
abstract truncate(size: int | None = None) int
abstract writable() bool
abstract write(b: U, /) int
abstract writelines(lines: Iterable[U], /) None