- Added SingleDocumentTranslationClient that is used to invoke
document_translate
API. document_translate
is the method added to submit a single/synchronous document translation request to the Document Translation service.DocumentTranslateContent
has been added to specify thedocument_translate
request content.
- Version
v1.0
is not supported. - The service has changed to date-based API versioning and v1.0 service behavior is supported through the new version: 2024-05-01.
- This version and all future versions will require Python 3.8+. Python 3.7 is no longer supported.
- Changed:
begin_translation
parametertarget_language_code
has been renamed totarget_language
. - Changed:
begin_translation
keyword-only argumentsource_language_code
has been renamed tosource_language
. - Changed:
DocumentTranslationInput
keyword-only argument and propertysource_language_code
has been renamed tosource_language
. - Changed:
TranslationTarget
keyword-only argument and propertylanguage_code
has been renamed tolanguage
. - Changed:
TranslationStatus
propertydocuments_not_yet_started_count
has been renamed todocuments_not_started_count
. - Removed:
results_per_page
keyword-only argument fromlist_translation_statuses
andlist_document_statuses
.
- Python 2.7 is no longer supported. Please use Python version 3.6 or later.
- Changed:
list_all_translation_statuses
has been renamed tolist_translation_statuses
- Changed:
list_all_document_statuses
has been renamed tolist_document_statuses
- Changed:
TranslationStatus
propertydocuments_cancelled_count
has been renamed todocuments_canceled_count
- Changed:
FileFormat
has been renamed toDocumentTranslationFileFormat
- Changed: Operation statuses
Cancelled
andCancelling
have been renamed toCanceled
andCanceling
, respectively.
- The operation
id
underdetails
of the poller object now populates correctly.
- The single translation input version of
begin_translation(source, target, target_language_code)
now accepts keyword argumentsstorage_type
,glossaries
,category_id
,prefix
,suffix
, andsource_language_code
.
- Changed: renamed kwargs
translated_before
andtranslated_after
tocreated_before
andcreated_after
, respectively, forlist_all_document_statuses
. - Changed: renamed
order_by
sorting query optioncreatedDateTimeUtc
tocreated_on
forlist_all_translation_statuses
andlist_all_document_statuses
.
TranslationStatusResult
was renamed toTranslationStatus
.DocumentStatusResult
was renamed toDocumentStatus
.get_document_formats
was renamed toget_supported_document_formats
.get_glossary_formats
was renamed toget_supported_glossary_formats
.
This version of the SDK defaults to the latest supported service version, which currently is v1.0
Breaking changes
create_translation_job
was removed and replaced withbegin_translation
which follows a long-running operation (LRO) approach. The client method now returns aDocumentTranslationLROPoller
(orAsyncDocumentTranslationLROPoller
) to begin the long-running operation. A call to.result()
can be made on the poller object to wait until the translation is complete. See the README for more information about LROs.- Upon completion of the LRO,
begin_translation
now returns a pageable ofDocumentStatusResult
. All job-level metadata can still be found onpoller.details
. has_completed
has been removed fromJobStatusResult
andDocumentStatusResult
. Usepoller.done()
to check if the translation has completed.- Client method
wait_until_done
has been removed. Usepoller.result()
to wait for the LRO to complete. - Client method
list_submitted_jobs
has been renamed tolist_all_translation_statuses
. - Client method
get_job_status
has been renamed toget_translation_status
. - Client method
cancel_job
has been renamed tocancel_translation
. - Parameter
job_id
was renamed totranslation_id
forget_translation_status
,cancel_translation
,list_all_document_statuses
, andget_document_status
. JobStatusResult
has been renamed toTranslationStatusResult
.DocumentStatusResult
propertytranslate_to
has been renamed totranslated_to
New features
- Authentication using
azure-identity
credentials now supported.- see the Azure Identity documentation for more information.
- Added paging and filtering options to
list_all_document_statuses
andlist_submitted_jobs
. - The input to
begin_translation
now accepts either the parameterinputs
as aList[DocumentTranslationInput]
to perform multiple translations, or the parameterssource_url
,target_url
, andtarget_language_code
to perform a single translation of your documents.
Dependency updates
- Package requires azure-core version 1.14.0 or greater.
This is the first beta package of the azure-ai-translation-document client library that targets the Document Translation
service version 1.0-preview.1
. This package's documentation and samples demonstrate the new API.