herostools.actor.archiver.zarr_archiver
=======================================

.. py:module:: herostools.actor.archiver.zarr_archiver


Classes
-------

.. autoapisummary::

   herostools.actor.archiver.zarr_archiver.ZarrArchiver


Module Contents
---------------

.. py:class:: ZarrArchiver(store_template: str, array_path_template: str, *args, **kwargs)

   Bases: :py:obj:`herostools.actor.archiver.base.HERODataArchiver`


   HERODataArchiver that stores numpy array payloads in a zarr store.

   The store root and the array key within it are both derived from Jinja2
   templates rendered against the merged metadata. Opening the store in
   append mode ('a') means successive calls accumulate arrays in the same
   store directory.

   :param store_template: Jinja2 template rendered to the zarr store root path.
   :param array_path_template: Jinja2 template rendered to the array key within the store.
   :param object_selector: Zenoh object selector for the devices to subscribe to.
   :param event_name: Name of the event.
   :param default_metadata: Default metadata available to both templates.
   :param max_retries: Number of times to retry a failed store before dropping the item.


   .. py:attribute:: store_template


   .. py:attribute:: array_path_template


   .. py:method:: _store(source_name: str, payload: numpy.typing.NDArray[Any], metadata: dict) -> None

      Write the payload array into the zarr store.

      :param source_name: Name of the event source (the HERO).
      :param payload: Numpy array to store.
      :param metadata: Incoming metadata merged with ``default_metadata``.



