AddressWriter

class lsst.pipe.base.quantum_graph.AddressWriter(indices: dict[uuid.UUID, int] = <factory>, addresses: list[dict[uuid.UUID, lsst.pipe.base.quantum_graph._multiblock.Address]] = <factory>)

Bases: object

A helper object for writing address files for multi-block files.

Methods Summary

write(stream, int_size)

Write all addresses to a file-like object.

write_to_zip(zf, name, int_size)

Write all addresses to a file in a zip archive.

Methods Documentation

write(stream: IO[bytes], int_size: int) None

Write all addresses to a file-like object.

Parameters:
streamtyping.IO [ bytes ]

Binary file-like object.

int_sizeint

Number of bytes to use for all integers.

write_to_zip(zf: zipfile.ZipFile, name: str, int_size: int) None

Write all addresses to a file in a zip archive.

Parameters:
zfzipfile.ZipFile

Zip archive to add the file to.

namestr

Base name for the address file; an extension will be added.

int_sizeint

Number of bytes to use for all integers.