ommx.experiment.attachments
===========================

.. py:module:: ommx.experiment.attachments

.. autoapi-nested-parse::

   Typed helpers for Experiment attachments.

   OMMX stores Experiment attachments as media-typed bytes. Provider packages
   that own richer Python objects can implement :class:`AttachmentCodec` to define
   how those objects are encoded into attachment bytes and decoded back.



Attributes
----------

.. autoapisummary::

   ommx.experiment.attachments.T


Classes
-------

.. autoapisummary::

   ommx.experiment.attachments.AttachmentCodec


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

.. py:class:: AttachmentCodec



   Codec for one Python attachment payload type.

   The codec implementation should live with the package that owns ``T``.
   For example, a JijModeling ``Problem`` codec belongs in ``jijmodeling``,
   not in OMMX.


   .. py:method:: decode(data: bytes, /) -> T
      :staticmethod:


      Decode attachment bytes back to a Python object.



   .. py:method:: encode(value: T, /) -> bytes
      :staticmethod:


      Encode a Python object to attachment bytes.



   .. py:attribute:: media_type
      :type:  str

      OCI media type used for this attachment payload.



.. py:data:: T

