azure-ai-textanalytics 5.3.0b1__py3-none-any.whl → 6.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of azure-ai-textanalytics might be problematic. Click here for more details.
- azure/ai/textanalytics/__init__.py +26 -197
- azure/ai/textanalytics/_client.py +111 -0
- azure/ai/textanalytics/_configuration.py +73 -0
- azure/ai/textanalytics/{_generated/v2022_05_01/operations → _operations}/__init__.py +13 -8
- azure/ai/textanalytics/_operations/_operations.py +716 -0
- azure/ai/textanalytics/{_generated/v2022_05_01/models → _operations}/_patch.py +8 -6
- azure/ai/textanalytics/_patch.py +350 -0
- azure/ai/textanalytics/{_generated/aio → _utils}/__init__.py +1 -5
- azure/ai/textanalytics/_utils/model_base.py +1237 -0
- azure/ai/textanalytics/{_generated/_serialization.py → _utils/serialization.py} +640 -616
- azure/ai/textanalytics/{_generated/v2022_05_01/aio/_vendor.py → _utils/utils.py} +10 -12
- azure/ai/textanalytics/_version.py +8 -7
- azure/ai/textanalytics/aio/__init__.py +25 -14
- azure/ai/textanalytics/aio/_client.py +115 -0
- azure/ai/textanalytics/aio/_configuration.py +75 -0
- azure/ai/textanalytics/{_generated/v2022_10_01_preview/aio/operations → aio/_operations}/__init__.py +13 -8
- azure/ai/textanalytics/aio/_operations/_operations.py +623 -0
- azure/ai/textanalytics/{_generated/v2022_05_01 → aio/_operations}/_patch.py +8 -6
- azure/ai/textanalytics/aio/_patch.py +344 -0
- azure/ai/textanalytics/models/__init__.py +402 -0
- azure/ai/textanalytics/models/_enums.py +1979 -0
- azure/ai/textanalytics/models/_models.py +6641 -0
- azure/ai/textanalytics/{_generated/v2022_05_01/aio → models}/_patch.py +8 -6
- azure/ai/textanalytics/py.typed +1 -0
- {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/METADATA +755 -319
- azure_ai_textanalytics-6.0.0b1.dist-info/RECORD +29 -0
- {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/WHEEL +1 -1
- azure/ai/textanalytics/_base_client.py +0 -111
- azure/ai/textanalytics/_check.py +0 -22
- azure/ai/textanalytics/_dict_mixin.py +0 -54
- azure/ai/textanalytics/_generated/__init__.py +0 -16
- azure/ai/textanalytics/_generated/_configuration.py +0 -70
- azure/ai/textanalytics/_generated/_operations_mixin.py +0 -795
- azure/ai/textanalytics/_generated/_text_analytics_client.py +0 -126
- azure/ai/textanalytics/_generated/_version.py +0 -8
- azure/ai/textanalytics/_generated/aio/_configuration.py +0 -66
- azure/ai/textanalytics/_generated/aio/_operations_mixin.py +0 -776
- azure/ai/textanalytics/_generated/aio/_text_analytics_client.py +0 -124
- azure/ai/textanalytics/_generated/models.py +0 -8
- azure/ai/textanalytics/_generated/v2022_05_01/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py +0 -72
- azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py +0 -100
- azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py +0 -45
- azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py +0 -71
- azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py +0 -97
- azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py +0 -121
- azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py +0 -603
- azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py +0 -281
- azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py +0 -5722
- azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py +0 -439
- azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py +0 -120
- azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py +0 -744
- azure/ai/textanalytics/_generated/v2022_10_01_preview/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_configuration.py +0 -72
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_text_analytics_client.py +0 -100
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_vendor.py +0 -45
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_configuration.py +0 -71
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_text_analytics_client.py +0 -97
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_vendor.py +0 -27
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/operations/_patch.py +0 -121
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/operations/_text_analytics_client_operations.py +0 -603
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/__init__.py +0 -407
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_models_py3.py +0 -8462
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_patch.py +0 -72
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_text_analytics_client_enums.py +0 -730
- azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/_patch.py +0 -120
- azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/_text_analytics_client_operations.py +0 -744
- azure/ai/textanalytics/_generated/v3_0/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_0/_configuration.py +0 -66
- azure/ai/textanalytics/_generated/v3_0/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py +0 -96
- azure/ai/textanalytics/_generated/v3_0/_vendor.py +0 -33
- azure/ai/textanalytics/_generated/v3_0/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py +0 -65
- azure/ai/textanalytics/_generated/v3_0/aio/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py +0 -93
- azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py +0 -27
- azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py +0 -428
- azure/ai/textanalytics/_generated/v3_0/models/__init__.py +0 -81
- azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py +0 -1467
- azure/ai/textanalytics/_generated/v3_0/models/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py +0 -58
- azure/ai/textanalytics/_generated/v3_0/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_0/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py +0 -604
- azure/ai/textanalytics/_generated/v3_1/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_1/_configuration.py +0 -66
- azure/ai/textanalytics/_generated/v3_1/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py +0 -98
- azure/ai/textanalytics/_generated/v3_1/_vendor.py +0 -45
- azure/ai/textanalytics/_generated/v3_1/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py +0 -65
- azure/ai/textanalytics/_generated/v3_1/aio/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py +0 -95
- azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py +0 -27
- azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py +0 -1291
- azure/ai/textanalytics/_generated/v3_1/models/__init__.py +0 -205
- azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py +0 -3976
- azure/ai/textanalytics/_generated/v3_1/models/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py +0 -367
- azure/ai/textanalytics/_generated/v3_1/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_1/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py +0 -1709
- azure/ai/textanalytics/_lro.py +0 -552
- azure/ai/textanalytics/_models.py +0 -3142
- azure/ai/textanalytics/_policies.py +0 -66
- azure/ai/textanalytics/_request_handlers.py +0 -104
- azure/ai/textanalytics/_response_handlers.py +0 -580
- azure/ai/textanalytics/_text_analytics_client.py +0 -1802
- azure/ai/textanalytics/_user_agent.py +0 -8
- azure/ai/textanalytics/_validate.py +0 -113
- azure/ai/textanalytics/aio/_base_client_async.py +0 -95
- azure/ai/textanalytics/aio/_lro_async.py +0 -501
- azure/ai/textanalytics/aio/_response_handlers_async.py +0 -94
- azure/ai/textanalytics/aio/_text_analytics_client_async.py +0 -1800
- azure_ai_textanalytics-5.3.0b1.dist-info/RECORD +0 -115
- {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info/licenses}/LICENSE +0 -0
- {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# coding=utf-8
|
|
2
|
-
# --------------------------------------------------------------------------
|
|
3
|
-
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
-
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
# --------------------------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin
|
|
10
|
-
|
|
11
|
-
from ._patch import __all__ as _patch_all
|
|
12
|
-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
|
|
13
|
-
from ._patch import patch_sdk as _patch_sdk
|
|
14
|
-
__all__ = [
|
|
15
|
-
'TextAnalyticsClientOperationsMixin',
|
|
16
|
-
]
|
|
17
|
-
__all__.extend([p for p in _patch_all if p not in __all__])
|
|
18
|
-
_patch_sdk()
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# ------------------------------------
|
|
2
|
-
# Copyright (c) Microsoft Corporation.
|
|
3
|
-
# Licensed under the MIT License.
|
|
4
|
-
# ------------------------------------
|
|
5
|
-
"""Customize generated code here.
|
|
6
|
-
|
|
7
|
-
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
8
|
-
"""
|
|
9
|
-
from typing import List, Any, Optional, Union, TypeVar, Callable, Dict, cast
|
|
10
|
-
from azure.core.tracing.decorator import distributed_trace
|
|
11
|
-
from azure.core.utils import case_insensitive_dict
|
|
12
|
-
from azure.core.pipeline import PipelineResponse
|
|
13
|
-
from azure.core.pipeline.transport import HttpResponse
|
|
14
|
-
from azure.core.polling import LROPoller, NoPolling, PollingMethod
|
|
15
|
-
from azure.core.rest import HttpRequest
|
|
16
|
-
from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin
|
|
17
|
-
from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod
|
|
18
|
-
from .. import models as _models
|
|
19
|
-
T = TypeVar('T')
|
|
20
|
-
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class TextAnalyticsClientOperationsMixin(GeneratedTextAnalyticsClientOperationsMixin):
|
|
24
|
-
|
|
25
|
-
@distributed_trace
|
|
26
|
-
def begin_analyze_text_submit_job(
|
|
27
|
-
self,
|
|
28
|
-
body: _models.AnalyzeTextJobsInput,
|
|
29
|
-
**kwargs: Any
|
|
30
|
-
) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]:
|
|
31
|
-
"""Submit text analysis job.
|
|
32
|
-
|
|
33
|
-
Submit a collection of text documents for analysis. Specify one or more unique tasks to be
|
|
34
|
-
executed as a long-running operation.
|
|
35
|
-
|
|
36
|
-
:param body: Collection of documents to analyze and one or more tasks to execute.
|
|
37
|
-
:type body: ~azure.ai.textanalytics.v2022_10_01_preview.models.AnalyzeTextJobsInput
|
|
38
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
|
39
|
-
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
|
|
40
|
-
:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass
|
|
41
|
-
in False for this operation to not poll, or pass in your own initialized polling object for a
|
|
42
|
-
personal polling strategy.
|
|
43
|
-
:paramtype polling: bool or ~azure.core.polling.PollingMethod
|
|
44
|
-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
|
|
45
|
-
Retry-After header is present.
|
|
46
|
-
:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeTextJobState or the
|
|
47
|
-
result of cls(response)
|
|
48
|
-
:rtype:
|
|
49
|
-
~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_10_01_preview.models.AnalyzeTextJobState]
|
|
50
|
-
:raises: ~azure.core.exceptions.HttpResponseError
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
poller_cls = kwargs.pop("poller_cls", AnalyzeActionsLROPoller) # Handwritten
|
|
54
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
|
55
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
|
56
|
-
|
|
57
|
-
api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-10-01-preview")) # type: str
|
|
58
|
-
content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str]
|
|
59
|
-
cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState]
|
|
60
|
-
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
|
|
61
|
-
lro_delay = kwargs.pop(
|
|
62
|
-
'polling_interval',
|
|
63
|
-
self._config.polling_interval
|
|
64
|
-
)
|
|
65
|
-
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
|
|
66
|
-
if cont_token is None:
|
|
67
|
-
raw_result = self._analyze_text_submit_job_initial( # type: ignore
|
|
68
|
-
body=body,
|
|
69
|
-
api_version=api_version,
|
|
70
|
-
content_type=content_type,
|
|
71
|
-
cls=lambda x,y,z: x,
|
|
72
|
-
headers=_headers,
|
|
73
|
-
params=_params,
|
|
74
|
-
**kwargs
|
|
75
|
-
)
|
|
76
|
-
kwargs.pop('error_map', None)
|
|
77
|
-
|
|
78
|
-
def get_long_running_output(pipeline_response):
|
|
79
|
-
deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response)
|
|
80
|
-
if cls:
|
|
81
|
-
return cls(pipeline_response, deserialized, {})
|
|
82
|
-
return deserialized
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
path_format_arguments = {
|
|
86
|
-
"Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True),
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if polling is True:
|
|
90
|
-
polling_method = cast(PollingMethod, AnalyzeActionsLROPollingMethod(
|
|
91
|
-
lro_delay,
|
|
92
|
-
|
|
93
|
-
path_format_arguments=path_format_arguments,
|
|
94
|
-
**kwargs
|
|
95
|
-
)) # type: PollingMethod
|
|
96
|
-
elif polling is False:
|
|
97
|
-
polling_method = cast(PollingMethod, NoPolling())
|
|
98
|
-
else:
|
|
99
|
-
polling_method = polling
|
|
100
|
-
if cont_token:
|
|
101
|
-
return poller_cls.from_continuation_token( # Handwritten
|
|
102
|
-
polling_method=polling_method,
|
|
103
|
-
continuation_token=cont_token,
|
|
104
|
-
client=self._client,
|
|
105
|
-
deserialization_callback=get_long_running_output
|
|
106
|
-
)
|
|
107
|
-
return poller_cls(self._client, raw_result, get_long_running_output, polling_method) # Handwritten
|
|
108
|
-
|
|
109
|
-
begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
__all__: List[str] = ["TextAnalyticsClientOperationsMixin"] # Add all objects you want publicly available to users at this package level
|
|
113
|
-
|
|
114
|
-
def patch_sdk():
|
|
115
|
-
"""Do not remove from this file.
|
|
116
|
-
|
|
117
|
-
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
|
118
|
-
you can't accomplish using the techniques described in
|
|
119
|
-
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
120
|
-
"""
|