ResourceHandleProtocol

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

Bases: typing.Protocol

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

Methods Summary

close()
fileno()
flush()
read(size)
readable()
readline(size)
readlines(hint)
seek(offset, whence)
seekable()
tell()
truncate(size, None] = None)
writable()
write(b)
writelines(lines)

Attributes Documentation

closed
isatty
mode

Methods Documentation

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