airflow/contrib/hooks/gcp_vision_hook.py
def safe_search_detection(
        self, image, max_results=None, retry=None, timeout=None, additional_properties=None
    ):
        """
        For the documentation see:
        :py:class:`~airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectImageSafeSearchOperator`
        """
        client = self.annotator_client

        self.log.info("Detecting safe search")

        if additional_properties is None:
            additional_properties = {}

        response = client.safe_search_detection(
            image=image, max_results=max_results, retry=retry, timeout=timeout, **additional_properties
        )
        response = MessageToDict(response)
        self._check_for_error(response)

        self.log.info("Safe search detection finished")
        return response
def safe_search_detection(
        self, image, max_results=None, retry=None, timeout=None, additional_properties=None
    ):
        """
        For the documentation see:
        :py:class:`~airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectImageSafeSearchOperator`
        """
        client = self.annotator_client

        self.log.info("Detecting safe search")

        if additional_properties is None:
            additional_properties = {}

        response = client.safe_search_detection(
            image=image, max_results=max_results, retry=retry, timeout=timeout, **additional_properties
        )
        response = MessageToDict(response)
        self._check_for_error(response)

        self.log.info("Safe search detection finished")
        return response
def safe_search_detection ( self , image , max_results = None , retry = None , timeout = None , additional_properties = None ) : client = self . annotator_client self . log . info ( "Detecting safe search" ) if additional_properties is None : additional_properties = { } response = client . safe_search_detection ( image = image , max_results = max_results , retry = retry , timeout = timeout , * * additional_properties ) response = MessageToDict ( response ) self . _check_for_error ( response ) self . log . info ( "Safe search detection finished" ) return response
For the documentation see:
        :py:class:`~airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectImageSafeSearchOperator`
For the documentation see : : py : class : ~airflow . contrib . operators . gcp_vision_operator . CloudVisionDetectImageSafeSearchOperator