write_archive#

lsst.images.serialization.write_archive(obj, path, **kwargs)#

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 (Any) – Object to write; must implement serialize like the per-backend write functions expect.

  • path (Path | str) – Destination path. The extension selects the backend.

  • **kwargs (Any) – Forwarded verbatim to the backend’s write.

Returns:

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

Return type:

Any

This page was last modified on .