AddressWriter#
- class lsst.pipe.base.quantum_graph.AddressWriter(addresses: list[dict[~uuid.UUID, ~lsst.pipe.base.quantum_graph._multiblock.Address]] = <factory>)#
Bases:
objectA helper object for writing address files for multi-block files.
Attributes Summary
Addresses to store with each UUID.
Methods Summary
Return all IDs used by any address dictionary.
write(stream, int_size[, all_ids])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.
Attributes Documentation
- addresses: list[dict[UUID, Address]] = <dataclasses._MISSING_TYPE object>#
Addresses to store with each UUID.
Every key in one of these dictionaries must have an entry in
indices. The converse is not true.
Methods Documentation
- get_all_ids() Set[UUID]#
Return all IDs used by any address dictionary.
Returns#
- all_ids
Set[uuid.UUID] Set of all IDs.
- all_ids
- write(stream: IO[bytes], int_size: int, all_ids: Set[UUID] | None = None) None#
Write all addresses to a file-like object.
Parameters#
- stream
typing.IO[bytes] Binary file-like object.
- int_size
int Number of bytes to use for all integers.
- all_ids
Set[uuid.UUID], optional Set of the union of all UUIDs in any dictionary from a call to
get_all_ids.
- stream