Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
b753e9c
Configurations: 'specification/ai/ContentUnderstanding/tspconfig.yam…
azure-sdk Nov 17, 2025
e8a9ed8
MIGRATE: Copy over the basic README.md
yungshinlintw Nov 17, 2025
a00ff25
MIGRATE: Migrate patch changes
yungshinlintw Nov 17, 2025
04f30a1
SAMPLE: Migrate analyze_url.py:
yungshinlintw Nov 17, 2025
2c5f1bb
SDK-GEN: Re-generate with updated TypeSpec
yungshinlintw Nov 17, 2025
9c07743
SDK-GEN: Re-generate for operation name fix
yungshinlintw Nov 17, 2025
af7c2fe
PATCH: Refactor patch to be static only for client, analyze overloads…
yungshinlintw Nov 17, 2025
f994805
SAMPLE: Add new sample for analyzing PDF documents using prebuilt-doc…
yungshinlintw Nov 17, 2025
bb1e2df
SAMPLE: Add analyze_binary_features.py to demonstrate advanced PDF an…
yungshinlintw Nov 17, 2025
b2746a4
SAMPLE: Migrate samples
yungshinlintw Nov 17, 2025
17eb5e6
PATCH: ContentField*.value
yungshinlintw Nov 17, 2025
7ec95d0
SERVICE-FIX: patch for KeyFrameTImesMs
yungshinlintw Nov 17, 2025
e5aef5e
SAMPLE: Add get_result_file.py to demonstrate video analysis and keyf…
yungshinlintw Nov 17, 2025
21c634b
SAMPLE: Add analyze_url_prebuilt_invoice.py to demonstrate invoice fi…
yungshinlintw Nov 17, 2025
6811239
SAMPLE: Add create_analyzer_with_labels.py for custom model training
yungshinlintw Nov 17, 2025
7122562
SAMPLE: Add cross-subscription copy samples for analyzers
yungshinlintw Nov 17, 2025
fdd919c
SERVICE-FIX/EMITTER-FIX: Fix issues from service returning 201. Fix i…
yungshinlintw Nov 17, 2025
8f49050
Update comments in _operations.py to clarify handling of service resp…
yungshinlintw Nov 20, 2025
2936921
Migrate CU SDK Test
yungshinlintw Nov 20, 2025
9ce48cd
add 4 new samples
Nov 21, 2025
7bd327c
update the flow of delete result
Nov 21, 2025
64639b0
add note
Nov 22, 2025
01ca41d
update readme
Nov 22, 2025
7f1e1a6
update sample env variables
Nov 22, 2025
e1af499
SAMPLE: Update models in samples to use GPT-4.1 instead of GPT-4o for…
yungshinlintw Nov 23, 2025
c90668f
Clean up sample output
yungshinlintw Nov 23, 2025
98fdfbc
first version
Nov 26, 2025
958e4d7
flat version
Nov 26, 2025
b51be61
fix samples
Nov 26, 2025
123802f
fix samples
Nov 26, 2025
706a644
add async samples
Nov 26, 2025
059b4fd
update Microsoft Foundry
Nov 26, 2025
f76ad36
update sample readme
Nov 26, 2025
4e19923
update sample readme
Nov 26, 2025
628ab78
update sample readme
Nov 26, 2025
dd52008
Merge remote-tracking branch 'origin/main' into sdkauto/azure-ai-cont…
yungshinlintw Nov 30, 2025
e432b5f
CHNAGELOG: Update the formats
yungshinlintw Nov 30, 2025
732cc1f
README: Update README.md for Azure AI Content Understanding samples: …
yungshinlintw Nov 30, 2025
c401b2a
SAMPLE:
yungshinlintw Nov 30, 2025
a30c238
SDK-GEN: Update with the latest main and also TypeSpec commit
yungshinlintw Dec 1, 2025
6007490
SDK-FIX: Fix copyAnalyzer path issue, and work around service issue t…
yungshinlintw Dec 1, 2025
34b648e
SERVICE-FIX: Work around service bug of returning "KeyFrameTimesMs"
yungshinlintw Dec 1, 2025
43c25c3
TEST: Removed bogus generated tests
yungshinlintw Dec 1, 2025
d482ab4
SAMPLE: Update invoice analysis samples to correctly extract line ite…
yungshinlintw Dec 1, 2025
d91908c
FEATURE: Enhance invoice analysis with comprehensive field extraction…
Dec 1, 2025
c002c18
FEATURE: Add tests for extracting markdown from binary documents and …
Dec 1, 2025
6368da7
FEATURE: Update content analyzer methods and add tests for binary doc…
Dec 1, 2025
2b76b13
Add sample tests for content understanding SDK
Dec 1, 2025
161c55a
SAMPLE: Minor clean-up
yungshinlintw Dec 1, 2025
e08ab76
TEST: Update sample tests
yungshinlintw Dec 1, 2025
4778361
CI: Fix README.md issue
yungshinlintw Dec 1, 2025
5b64474
TEST: Update sample tests
yungshinlintw Dec 1, 2025
9942251
CI: Fix cspell issue
yungshinlintw Dec 1, 2025
b6848c7
TEST: Added assets.json for pushed recording.
yungshinlintw Dec 1, 2025
9b898f0
Merge branch 'main' into sdkauto/azure-ai-contentunderstanding-5580124
yungshinlintw Dec 1, 2025
459fbcb
TEST: In playback, do not check for required env var
yungshinlintw Dec 1, 2025
86cb90b
TEST: Put required var for grant copy auth and update recording
yungshinlintw Dec 1, 2025
ae0a743
CI: Update README and CHANGELOG
yungshinlintw Dec 1, 2025
9a429b2
CI: Fix MyPy issues
yungshinlintw Dec 1, 2025
c1e5957
SDK-EXT: Add proper typing stub for ContentType.values and its derive…
yungshinlintw Dec 1, 2025
5656986
CI: PyLint fixes
yungshinlintw Dec 1, 2025
f8c12bd
CI: README links
yungshinlintw Dec 1, 2025
fbc9862
CI: Exclude generated files for mypy and pyright
yungshinlintw Dec 1, 2025
2732352
CI: Fix Pylint issues
yungshinlintw Dec 1, 2025
f3af3c7
[Tests] Update to use AZURE_CONTENT_UNDERSTANDING_ENDPOINT
Dec 1, 2025
6e47c1d
CI: Address test issue in CI
yungshinlintw Dec 1, 2025
6a2b8eb
CI: Pylint issues
yungshinlintw Dec 1, 2025
6877dd8
[Tests] Update to use AZURE_CONTENT_UNDERSTANDING_ENDPOINT
Dec 1, 2025
d1762ec
[Tests] change total_amount to amount_due
Dec 1, 2025
c6b66e2
merge with branch
Dec 1, 2025
9092f82
[Sample tests] add async sample tests
Dec 1, 2025
b08a818
[Tests] Update to use AZURE_CONTENT_UNDERSTANDING_ENDPOINT
Dec 1, 2025
fd85503
README: Improve main README
yungshinlintw Dec 2, 2025
8ee6099
TEST: Updated assets.json for the new recordings
yungshinlintw Dec 2, 2025
f18cbc3
Merge branch 'main' into sdkauto/azure-ai-contentunderstanding-5580124
yungshinlintw Dec 2, 2025
bcfcd51
[Sample] get raw json for analyze_return_raw_json samples and tests
Dec 8, 2025
6cdca09
[Sample] print out markdown for get_raw_json sample
Dec 8, 2025
58f4fd0
[TypeSpec] Commit update
Dec 17, 2025
eba3190
[SDK-UPDATE] a3291026612253abe544704a27bfad1dbdd5dcc2
Dec 17, 2025
a36ea83
[SAMPLE-UPDATE] ContentCategory to ContentCategoryDefinition
Dec 17, 2025
4dc8c65
[TEST-INFRA] skip folders/files for pytest
Dec 17, 2025
ca1936c
[SDK-UPDATE] remove _patch.py functions
Dec 17, 2025
dfa17f8
[SAMPLE-UPDATE] update samples accroding to .NET samples
Dec 17, 2025
9aa2a4e
[SAMPLE-UPDATE] rename sample_update_defaults_async to sample_update_…
Dec 19, 2025
dd26e9a
[SAMPLE-UPDATE] sample_update_defaults
Dec 19, 2025
2f82dd0
[SAMPLE-UPDATE] sample_analyze_binary_async.py
Dec 19, 2025
31837a9
[SAMPLE-UPDATE] sample_analyze_url
Dec 19, 2025
dd786e1
[SAMPLE-UPDATE] sample_analyze_invoice
Dec 19, 2025
0aa5cc0
[SAMPLE-UPDATE] sample_analyze_invoice
Dec 19, 2025
8bdf14e
[SAMPLE-UPDATE] update terms for sample_update_defaults
Dec 19, 2025
67614b7
[SAMPLE-UPDATE] sample_create_analyzer
Dec 19, 2025
31c93de
[SAMPLE-UPDATE] sample_create_classifier
Dec 19, 2025
1b752b6
[SAMPLE-UPDATE] sample_get_analyzer
Dec 19, 2025
bfc268c
[SAMPLE-UPDATE] sample_list_analyzers
Dec 19, 2025
77a485c
[SAMPLE-UPDATE] sample_analyze_configs
Dec 19, 2025
4985ecf
[SAMPLE-UPDATE] sample_analyze_return_raw_json
Dec 20, 2025
9ba0557
[SAMPLE-UPDATE] sample_get_result_file
Dec 20, 2025
0cb07ea
[SAMPLE-UPDATE] sample_delete_result
Dec 20, 2025
39bc27b
[SAMPLE-UPDATE] sample_grant_copy_auth
Dec 20, 2025
9dc93d7
[SAMPLE-DOC] update sample description
Dec 22, 2025
02b8a4a
[SAMPLE-DOC] update readme and test sample description
Dec 22, 2025
67937a5
[SAMPLE-DOC] update sample readme
Dec 22, 2025
c7d59d3
[README] update based on .NET
Dec 22, 2025
6563b26
[TEST-FIX] fix test_sample_grant_copy_auth
Dec 23, 2025
c82387f
[SAMPLE-FIX] MyPy fix
Dec 23, 2025
b8c263e
[ANALYZE-FIX] spelling and link
Dec 23, 2025
6f58471
[ANALYZE-FIX] pylint
Dec 23, 2025
db521e7
[PATCH-UPDATE] remove unused patch
Dec 23, 2025
85bd72a
[SAMPLE-README] improvement
Dec 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Sample and test output files (any directory starting with these names)
**/test_output*/
**/sample_output*/

# Virtual environment
.venv/

# Python cache
__pycache__/
*.pyc
*.pyo
*.pyd
.Python

# IDE
.vscode/
.idea/

# Testing
.pytest_cache/
.coverage
htmlcov/
tests/recordings/

# Environment variables
.env

.local_only/
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Release History

## 1.0.0b1 (Unreleased)

### Features Added
- Initial release of Azure AI Content Understanding client library for Python
- Added `ContentUnderstandingClient` for analyzing documents, audio, and video content

### Breaking Changes

### Bugs Fixed

### Other Changes
21 changes: 21 additions & 0 deletions sdk/contentunderstanding/azure-ai-contentunderstanding/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) Microsoft Corporation.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include *.md
include LICENSE
include azure/ai/contentunderstanding/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/ai/__init__.py
658 changes: 658 additions & 0 deletions sdk/contentunderstanding/azure-ai-contentunderstanding/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersion": "2025-11-01"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"CrossLanguagePackageId": "ContentUnderstanding",
"CrossLanguageDefinitionId": {
"azure.ai.contentunderstanding.models.AnalyzeInput": "ContentUnderstanding.AnalyzeInput",
"azure.ai.contentunderstanding.models.AnalyzeResult": "ContentUnderstanding.AnalyzeResult",
"azure.ai.contentunderstanding.models.ContentField": "ContentUnderstanding.ContentField",
"azure.ai.contentunderstanding.models.ArrayField": "ContentUnderstanding.ArrayField",
"azure.ai.contentunderstanding.models.MediaContent": "ContentUnderstanding.MediaContent",
"azure.ai.contentunderstanding.models.AudioVisualContent": "ContentUnderstanding.AudioVisualContent",
"azure.ai.contentunderstanding.models.AudioVisualContentSegment": "ContentUnderstanding.AudioVisualContentSegment",
"azure.ai.contentunderstanding.models.BooleanField": "ContentUnderstanding.BooleanField",
"azure.ai.contentunderstanding.models.ContentAnalyzer": "ContentUnderstanding.ContentAnalyzer",
"azure.ai.contentunderstanding.models.ContentAnalyzerAnalyzeOperationStatus": "ContentUnderstanding.ContentAnalyzerAnalyzeOperationStatus",
"azure.ai.contentunderstanding.models.ContentAnalyzerConfig": "ContentUnderstanding.ContentAnalyzerConfig",
"azure.ai.contentunderstanding.models.ContentAnalyzerOperationStatus": "ContentUnderstanding.ContentAnalyzerOperationStatus",
"azure.ai.contentunderstanding.models.ContentCategoryDefinition": "ContentUnderstanding.ContentCategoryDefinition",
"azure.ai.contentunderstanding.models.ContentFieldDefinition": "ContentUnderstanding.ContentFieldDefinition",
"azure.ai.contentunderstanding.models.ContentFieldSchema": "ContentUnderstanding.FieldSchema",
"azure.ai.contentunderstanding.models.ContentSpan": "ContentUnderstanding.ContentSpan",
"azure.ai.contentunderstanding.models.ContentUnderstandingDefaults": "ContentUnderstanding.ContentUnderstandingDefaults",
"azure.ai.contentunderstanding.models.CopyAuthorization": "ContentUnderstanding.CopyAuthorization",
"azure.ai.contentunderstanding.models.DateField": "ContentUnderstanding.DateField",
"azure.ai.contentunderstanding.models.DocumentAnnotation": "ContentUnderstanding.DocumentAnnotation",
"azure.ai.contentunderstanding.models.DocumentAnnotationComment": "ContentUnderstanding.DocumentAnnotationComment",
"azure.ai.contentunderstanding.models.DocumentBarcode": "ContentUnderstanding.DocumentBarcode",
"azure.ai.contentunderstanding.models.DocumentCaption": "ContentUnderstanding.DocumentCaption",
"azure.ai.contentunderstanding.models.DocumentFigure": "ContentUnderstanding.DocumentFigure",
"azure.ai.contentunderstanding.models.DocumentChartFigure": "ContentUnderstanding.DocumentChartFigure",
"azure.ai.contentunderstanding.models.DocumentContent": "ContentUnderstanding.DocumentContent",
"azure.ai.contentunderstanding.models.DocumentContentSegment": "ContentUnderstanding.DocumentContentSegment",
"azure.ai.contentunderstanding.models.DocumentFootnote": "ContentUnderstanding.DocumentFootnote",
"azure.ai.contentunderstanding.models.DocumentFormula": "ContentUnderstanding.DocumentFormula",
"azure.ai.contentunderstanding.models.DocumentHyperlink": "ContentUnderstanding.DocumentHyperlink",
"azure.ai.contentunderstanding.models.DocumentLine": "ContentUnderstanding.DocumentLine",
"azure.ai.contentunderstanding.models.DocumentMermaidFigure": "ContentUnderstanding.DocumentMermaidFigure",
"azure.ai.contentunderstanding.models.DocumentPage": "ContentUnderstanding.DocumentPage",
"azure.ai.contentunderstanding.models.DocumentParagraph": "ContentUnderstanding.DocumentParagraph",
"azure.ai.contentunderstanding.models.DocumentSection": "ContentUnderstanding.DocumentSection",
"azure.ai.contentunderstanding.models.DocumentTable": "ContentUnderstanding.DocumentTable",
"azure.ai.contentunderstanding.models.DocumentTableCell": "ContentUnderstanding.DocumentTableCell",
"azure.ai.contentunderstanding.models.DocumentWord": "ContentUnderstanding.DocumentWord",
"azure.ai.contentunderstanding.models.IntegerField": "ContentUnderstanding.IntegerField",
"azure.ai.contentunderstanding.models.JsonField": "ContentUnderstanding.JsonField",
"azure.ai.contentunderstanding.models.KnowledgeSource": "ContentUnderstanding.KnowledgeSource",
"azure.ai.contentunderstanding.models.LabeledDataKnowledgeSource": "ContentUnderstanding.LabeledDataKnowledgeSource",
"azure.ai.contentunderstanding.models.NumberField": "ContentUnderstanding.NumberField",
"azure.ai.contentunderstanding.models.ObjectField": "ContentUnderstanding.ObjectField",
"azure.ai.contentunderstanding.models.RecordMergePatchUpdate": "TypeSpec.RecordMergePatchUpdate",
"azure.ai.contentunderstanding.models.StringField": "ContentUnderstanding.StringField",
"azure.ai.contentunderstanding.models.SupportedModels": "ContentUnderstanding.SupportedModels",
"azure.ai.contentunderstanding.models.TimeField": "ContentUnderstanding.TimeField",
"azure.ai.contentunderstanding.models.TranscriptPhrase": "ContentUnderstanding.TranscriptPhrase",
"azure.ai.contentunderstanding.models.TranscriptWord": "ContentUnderstanding.TranscriptWord",
"azure.ai.contentunderstanding.models.UsageDetails": "ContentUnderstanding.UsageDetails",
"azure.ai.contentunderstanding.models.MediaContentKind": "ContentUnderstanding.MediaContentKind",
"azure.ai.contentunderstanding.models.ContentFieldType": "ContentUnderstanding.ContentFieldType",
"azure.ai.contentunderstanding.models.LengthUnit": "ContentUnderstanding.LengthUnit",
"azure.ai.contentunderstanding.models.DocumentBarcodeKind": "ContentUnderstanding.DocumentBarcodeKind",
"azure.ai.contentunderstanding.models.DocumentFormulaKind": "ContentUnderstanding.DocumentFormulaKind",
"azure.ai.contentunderstanding.models.SemanticRole": "ContentUnderstanding.SemanticRole",
"azure.ai.contentunderstanding.models.DocumentTableCellKind": "ContentUnderstanding.DocumentTableCellKind",
"azure.ai.contentunderstanding.models.DocumentFigureKind": "ContentUnderstanding.DocumentFigureKind",
"azure.ai.contentunderstanding.models.DocumentAnnotationKind": "ContentUnderstanding.DocumentAnnotationKind",
"azure.ai.contentunderstanding.models.ProcessingLocation": "ContentUnderstanding.ProcessingLocation",
"azure.ai.contentunderstanding.models.ContentAnalyzerStatus": "ContentUnderstanding.ContentAnalyzerStatus",
"azure.ai.contentunderstanding.models.TableFormat": "ContentUnderstanding.TableFormat",
"azure.ai.contentunderstanding.models.ChartFormat": "ContentUnderstanding.ChartFormat",
"azure.ai.contentunderstanding.models.AnnotationFormat": "ContentUnderstanding.AnnotationFormat",
"azure.ai.contentunderstanding.models.GenerationMethod": "ContentUnderstanding.GenerationMethod",
"azure.ai.contentunderstanding.models.KnowledgeSourceKind": "ContentUnderstanding.KnowledgeSourceKind",
"azure.ai.contentunderstanding.models.OperationState": "Azure.Core.Foundations.OperationState",
"azure.ai.contentunderstanding.ContentUnderstandingClient.begin_analyze": "ClientCustomizations.ContentUnderstandingClient.analyze",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.begin_analyze": "ClientCustomizations.ContentUnderstandingClient.analyze",
"azure.ai.contentunderstanding.ContentUnderstandingClient.begin_analyze_binary": "ClientCustomizations.ContentUnderstandingClient.analyzeBinary",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.begin_analyze_binary": "ClientCustomizations.ContentUnderstandingClient.analyzeBinary",
"azure.ai.contentunderstanding.ContentUnderstandingClient.begin_copy_analyzer": "ClientCustomizations.ContentUnderstandingClient.copyAnalyzer",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.begin_copy_analyzer": "ClientCustomizations.ContentUnderstandingClient.copyAnalyzer",
"azure.ai.contentunderstanding.ContentUnderstandingClient.begin_create_analyzer": "ClientCustomizations.ContentUnderstandingClient.createAnalyzer",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.begin_create_analyzer": "ClientCustomizations.ContentUnderstandingClient.createAnalyzer",
"azure.ai.contentunderstanding.ContentUnderstandingClient.delete_analyzer": "ClientCustomizations.ContentUnderstandingClient.deleteAnalyzer",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.delete_analyzer": "ClientCustomizations.ContentUnderstandingClient.deleteAnalyzer",
"azure.ai.contentunderstanding.ContentUnderstandingClient.delete_result": "ClientCustomizations.ContentUnderstandingClient.deleteResult",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.delete_result": "ClientCustomizations.ContentUnderstandingClient.deleteResult",
"azure.ai.contentunderstanding.ContentUnderstandingClient.get_analyzer": "ClientCustomizations.ContentUnderstandingClient.getAnalyzer",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.get_analyzer": "ClientCustomizations.ContentUnderstandingClient.getAnalyzer",
"azure.ai.contentunderstanding.ContentUnderstandingClient.get_defaults": "ClientCustomizations.ContentUnderstandingClient.getDefaults",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.get_defaults": "ClientCustomizations.ContentUnderstandingClient.getDefaults",
"azure.ai.contentunderstanding.ContentUnderstandingClient.get_result_file": "ClientCustomizations.ContentUnderstandingClient.getResultFile",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.get_result_file": "ClientCustomizations.ContentUnderstandingClient.getResultFile",
"azure.ai.contentunderstanding.ContentUnderstandingClient.grant_copy_authorization": "ClientCustomizations.ContentUnderstandingClient.grantCopyAuthorization",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.grant_copy_authorization": "ClientCustomizations.ContentUnderstandingClient.grantCopyAuthorization",
"azure.ai.contentunderstanding.ContentUnderstandingClient.list_analyzers": "ClientCustomizations.ContentUnderstandingClient.listAnalyzers",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.list_analyzers": "ClientCustomizations.ContentUnderstandingClient.listAnalyzers",
"azure.ai.contentunderstanding.ContentUnderstandingClient.update_analyzer": "ClientCustomizations.ContentUnderstandingClient.updateAnalyzer",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.update_analyzer": "ClientCustomizations.ContentUnderstandingClient.updateAnalyzer",
"azure.ai.contentunderstanding.ContentUnderstandingClient.update_defaults": "ClientCustomizations.ContentUnderstandingClient.updateDefaults",
"azure.ai.contentunderstanding.aio.ContentUnderstandingClient.update_defaults": "ClientCustomizations.ContentUnderstandingClient.updateDefaults"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/contentunderstanding/azure-ai-contentunderstanding",
"Tag": "python/contentunderstanding/azure-ai-contentunderstanding_2d9b35e90e"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._client import ContentUnderstandingClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"ContentUnderstandingClient",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, TYPE_CHECKING, Union
from typing_extensions import Self

from azure.core import PipelineClient
from azure.core.credentials import AzureKeyCredential
from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse

from ._configuration import ContentUnderstandingClientConfiguration
from ._operations import _ContentUnderstandingClientOperationsMixin
from ._utils.serialization import Deserializer, Serializer

if TYPE_CHECKING:
from azure.core.credentials import TokenCredential


class ContentUnderstandingClient(_ContentUnderstandingClientOperationsMixin):
"""ContentUnderstandingClient.

:param endpoint: Content Understanding service endpoint. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2025-11-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
_endpoint = "{endpoint}/contentunderstanding"
self._config = ContentUnderstandingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs)

self._serialize = Serializer()
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client.send_request(request)
<HttpResponse: 200 OK>

For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request

:param request: The network request you want to make. Required.
:type request: ~azure.core.rest.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.HttpResponse
"""

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
self._client.close()

def __enter__(self) -> Self:
self._client.__enter__()
return self

def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
Loading
Loading