:py:mod:`ivcap_client.artifact` =============================== .. py:module:: ivcap_client.artifact Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ivcap_client.artifact.Artifact ivcap_client.artifact.ArtifactIter Functions ~~~~~~~~~ .. autoapisummary:: ivcap_client.artifact.check_file_already_uploaded ivcap_client.artifact.mark_file_already_uploaded ivcap_client.artifact._upload_marker ivcap_client.artifact.md5sum .. py:class:: Artifact(ivcap: ivcap_client.ivcap.IVCAP, **kwargs) This class represents an artifact record stored at a particular IVCAP deployment .. py:property:: urn :type: str .. py:property:: status :type: ivcap_client.models.artifact_status_rt.ArtifactStatusRT .. py:property:: metadata :type: Iterator[ivcap_client.aspect.Aspect] .. py:attribute:: id :type: str .. py:attribute:: status :type: ivcap_client.models.artifact_status_rt_status.ArtifactStatusRTStatus .. py:attribute:: name :type: Optional[str] .. py:attribute:: size :type: Optional[int] .. py:attribute:: mime_type :type: Optional[str] .. py:attribute:: created_at :type: Optional[datetime.datetime.datetime] .. py:attribute:: last_modified_at :type: Optional[datetime.datetime.datetime] .. py:attribute:: etag :type: Optional[str] .. py:attribute:: policy :type: Optional[ivcap_client.ivcap.URN] .. py:attribute:: account :type: Optional[ivcap_client.ivcap.URN] .. py:method:: _from_list_item(item: ivcap_client.models.artifact_list_item.ArtifactListItem, ivcap: ivcap_client.ivcap.IVCAP) :classmethod: .. py:method:: __update__(**kwargs) .. py:method:: refresh() -> Artifact .. py:method:: add_metadata(aspect: Dict[str, any], *, schema: Optional[str] = None, policy: Optional[ivcap_client.ivcap.URN] = None) -> Artifact Add a metadata 'aspect' to this artifact. The 'schema' of the aspect, if not defined is expected to found in the 'aspect' under the '$schema' key. :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: To enable chaining :rtype: self .. py:method:: __repr__() Return repr(self). .. py:class:: ArtifactIter(ivcap: ivcap_client.ivcap.IVCAP, **kwargs) Bases: :py:obj:`ivcap_client.utils.BaseIter`\ [\ :py:obj:`Artifact`\ , :py:obj:`ivcap_client.models.artifact_list_item.ArtifactListItem`\ ] Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: _next_el(el) -> Artifact .. py:method:: _get_list() -> List[ivcap_client.models.artifact_list_item.ArtifactListItem] .. py:function:: check_file_already_uploaded(file_path: str) -> Optional[str] .. py:function:: mark_file_already_uploaded(id: str, file_path: str) .. py:function:: _upload_marker(file_path: str) .. py:function:: md5sum(filename, blocksize=65536)