write#

lsst.images.serialization.write(obj: Any, path: str, **kwargs: Any) Any#

Write obj to path, dispatching by file extension.

Forwards **kwargs to the per-backend write (e.g. compression_options for FITS). No registry lookup is performed: the per-backend write already accepts any object with a serialize method.

Parameters#

obj

Object to write; must implement serialize like the per-backend write functions expect.

path

Destination path. The extension selects the backend.

**kwargs

Forwarded verbatim to the backend’s write.

Returns#

Any

Whatever the per-backend write returns (the serialised archive tree).