:py:mod:`ivcap_client.aspect` ============================= .. py:module:: ivcap_client.aspect Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ivcap_client.aspect.Aspect ivcap_client.aspect.AspectIter Functions ~~~~~~~~~ .. autoapisummary:: ivcap_client.aspect._add_update_aspect .. py:class:: Aspect(ivcap: ivcap_client.ivcap.IVCAP, **kwargs) This class represents a aspect record stored at a particular IVCAP deployment .. py:property:: urn :type: str .. py:property:: aspect :type: dict .. py:property:: content :type: dict .. py:attribute:: id :type: str .. py:attribute:: entity :type: str .. py:attribute:: schema :type: str .. py:attribute:: content_type :type: Optional[str] .. py:attribute:: valid_from :type: Optional[datetime.datetime] .. py:attribute:: valid_to :type: Optional[datetime.datetime] .. py:attribute:: asserter :type: Optional[ivcap_client.ivcap.URN] .. py:attribute:: retracter :type: Optional[ivcap_client.ivcap.URN] .. py:method:: _from_list_item(item: ivcap_client.models.aspect_list_item_rt.AspectListItemRT, ivcap: ivcap_client.ivcap.IVCAP) :classmethod: .. py:method:: __update__(**kwargs) .. py:method:: refresh() -> Aspect .. py:method:: retract() -> Aspect Retract this aspect .. py:method:: __repr__() Return repr(self). .. py:class:: AspectIter(ivcap: ivcap_client.ivcap.IVCAP, **kwargs) Bases: :py:obj:`ivcap_client.utils.BaseIter`\ [\ :py:obj:`Aspect`\ , :py:obj:`ivcap_client.models.aspect_list_item_rt.AspectListItemRT`\ ] Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: _next_el(el) -> Aspect .. py:method:: _get_list() -> List[ivcap_client.models.aspect_list_item_rt.AspectListItemRT] .. py:function:: _add_update_aspect(ivcap: ivcap_client.ivcap.IVCAP, is_update: bool, entity: str, aspect: Dict[str, any], *, schema: Optional[str] = None, policy: Optional[ivcap_client.ivcap.URN] = None) -> Aspect Add an 'aspect' to an 'entity'. The 'schema' of the aspect, if not defined is expected to found in the 'aspect' under the '$schema' key. :param entity: URN of the entity to attach the aspect to :type entity: str :param aspect: The aspect to be attached :type aspect: dict :param schema: Schema of the aspect. Defaults to 'aspect["$schema"]'. :type schema: Optional[str], optional :param policy: Optional[URN]: Set specific policy controlling access ('urn:ivcap:policy:...'). :returns: The created aspect record :rtype: aspect