How to use the azure-cognitiveservices-vision-computervision.azure.cognitiveservices.vision.computervision.models.ImageUrl function in azure-cognitiveservices-vision-computervision

To help you get started, we’ve selected a few azure-cognitiveservices-vision-computervision examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
'Handwritten', 'Printed'
        :type mode: str or
         ~azure.cognitiveservices.vision.computervision.models.TextRecognitionMode
        :param url: Publicly reachable URL of an image.
        :type url: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.recognize_text.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['mode'] = self._serialize.query("mode", mode, 'TextRecognitionMode')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
'tr', 'ar', 'ro', 'sr-Cyrl', 'sr-Latn', 'sk'
        :type language: str or
         ~azure.cognitiveservices.vision.computervision.models.OcrLanguages
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: OcrResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.OcrResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.recognize_printed_text.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['detectOrientation'] = self._serialize.query("detect_orientation", detect_orientation, 'bool')
        if language is not None:
            query_parameters['language'] = self._serialize.query("language", language, 'OcrLanguages')

        # Construct headers
        header_parameters = {}
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese.
         Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        :type language: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: TagResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.TagResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.tag_image.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        if language is not None:
            query_parameters['language'] = self._serialize.query("language", language, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese.
         Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        :type language: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: ImageDescription or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.ImageDescription
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.describe_image.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        if max_candidates is not None:
            query_parameters['maxCandidates'] = self._serialize.query("max_candidates", max_candidates, 'int')
        if language is not None:
            query_parameters['language'] = self._serialize.query("language", language, 'str')

        # Construct headers
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
'Handwritten', 'Printed'
        :type mode: str or
         ~azure.cognitiveservices.vision.computervision.models.TextRecognitionMode
        :param url: Publicly reachable URL of an image.
        :type url: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.batch_read_file.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['mode'] = self._serialize.query("mode", mode, 'TextRecognitionMode')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese.
         Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        :type language: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: DomainModelResults or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.DomainModelResults
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.analyze_image_by_domain.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
            'model': self._serialize.url("model", model, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        if language is not None:
            query_parameters['language'] = self._serialize.query("language", language, 'str')

        # Construct headers
        header_parameters = {}
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese.
         Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        :type language: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: ImageAnalysis or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.ImageAnalysis or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.analyze_image.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        if visual_features is not None:
            query_parameters['visualFeatures'] = self._serialize.query("visual_features", visual_features, '[VisualFeatureTypes]', div=',')
        if details is not None:
            query_parameters['details'] = self._serialize.query("details", details, '[Details]', div=',')
        if language is not None:
            query_parameters['language'] = self._serialize.query("language", language, 'str')
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
:param url: Publicly reachable URL of an image.
        :type url: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: DetectResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.DetectResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.detect_objects.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:
github Azure / azure-sdk-for-python / azure-cognitiveservices-vision-computervision / azure / cognitiveservices / vision / computervision / computer_vision_client.py View on Github external
:param url: Publicly reachable URL of an image.
        :type url: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: AreaOfInterestResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.computervision.models.AreaOfInterestResult
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ComputerVisionErrorException`
        """
        image_url = models.ImageUrl(url=url)

        # Construct URL
        url = self.get_area_of_interest.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:

azure-cognitiveservices-vision-computervision

Microsoft Azure Cognitive Services Computer Vision Client Library for Python

MIT
Latest version published 17 days ago

Package Health Score

87 / 100
Full package analysis

Popular azure-cognitiveservices-vision-computervision functions

Similar packages