fulltext/services/preview/preview.py
def does_exist(self, identifier: str, token: str) \
            -> Tuple[bool, Optional[str]]:
        """
        Determine whether or not a preview exists for an identifier.

        Parameters
        ----------
        identifier : str
            Combination of the source ID and checksum:
            ``{source_id}/{checksum}``, where ``source_id`` is the unique
            identifier of the source package from which the preview was
            generated, and ``checksum`` is the URL-safe base64-encoded MD5 hash
            of the source package content.
        token : str
            Authnz token for the request.

        Returns
        -------
        bool
        str
            URL-safe base64-encoded MD5 hash of the preview content.

        """
        response = self.request('head', f'/{identifier}/content', token)
        if response.status_code == status.OK:
            return True, str(response.headers['ETag'])
        return False, None

        Determine whether or not a preview exists for an identifier.

        Parameters
        ----------
        identifier : str
            Combination of the source ID and checksum:
            ``{source_id}/{checksum}``, where ``source_id`` is the unique
            identifier of the source package from which the preview was
            generated, and ``checksum`` is the URL-safe base64-encoded MD5 hash
            of the source package content.
        token : str
            Authnz token for the request.

        Returns
        -------
        bool
        str
            URL-safe base64-encoded MD5 hash of the preview content.

        
Determine whether or not a preview exists for an identifier.
Parameters



Returns

bool
str
URL-safe base64-encoded MD5 hash of the preview content.
Determine whether or not a preview exists for an identifier . Parameters Returns bool str URL - safe base64 - encoded MD5 hash of the preview content .
def does_exist(self, identifier: str, token: str) \
            -> Tuple[bool, Optional[str]]:
        response = self.request('head', f'/{identifier}/content', token)
        if response.status_code == status.OK:
            return True, str(response.headers['ETag'])
        return False, None
def does_exist ( self , identifier : str , token : str ) -> Tuple [ bool , Optional [ str ] ] : response = self . request ( 'head' , f'/{identifier}/content' , token ) if response . status_code == status . OK : return True , str ( response . headers [ 'ETag' ] ) return False , None
Determine whether or not a preview exists for an identifier.
Determine whether or not a preview exists for an identifier .
"""
        Determine whether or not a preview exists for an identifier.

        Parameters
        ----------
        identifier : str
            Combination of the source ID and checksum:
            ``{source_id}/{checksum}``, where ``source_id`` is the unique
            identifier of the source package from which the preview was
            generated, and ``checksum`` is the URL-safe base64-encoded MD5 hash
            of the source package content.
        token : str
            Authnz token for the request.

        Returns
        -------
        bool
        str
            URL-safe base64-encoded MD5 hash of the preview content.

        """
self
identifier
str
token
str