NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3546 most downloaded on PyPI
Microsoft Azure Form Recognizer Client Library for Python
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 10 of 10 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
26 releases · first in 2020
One column per quarter.
Python 3.7 is no longer supported. Please use Python version 3.8 or later.
Code | Docs
Support: Active
Health Deidentification
azure-health-deidentification
Fixed incorrect data type for returned formula objects.
Exposed send_request() method in each client to send custom requests using the client's existing pipeline.
send_request() method in each client to send custom requests using the client's existing pipeline. (#32151)This version of the client library defaults to the service API version 2023-07-31.
This version of the client library defaults to the service API version 2023-07-31.
Note: The following changes are only breaking from the previous beta. They are not breaking against previous stable versions.
2023-07-31.query_fields keyword argument from begin_analyze_document() and begin_analyze_document_from_url().kind property from DocumentPage.images property from DocumentPage.DocumentImage model.annotations property from DocumentPage.DocumentAnnotation model.common_name property from DocumentKeyValuePair.AnalysisFeature enum member names and values. Supported enum members are: OCR_HIGH_RESOLUTION, LANGUAGES, BARCODES, FORMULAS, KEY_VALUE_PAIRS, STYLE_FONT.custom_neural_document_model_builds property to neural_document_model_quota on ResourceDetails model.AzureBlobSource model to BlobSource.AzureBlobFileListSource model to BlobFileListSource.neural_document_model_quota as optional on ResourceDetails.polygon property on DocumentWord, DocumentSelectionMark, DocumentLine.words, lines, and selection_marks properties on DocumentPage.v3.2_and_later/ for samples that support 3.2 and later.This version of the client library defaults to the service API version 2023-02-28-preview.
This version of the client library defaults to the service API version 2023-02-28-preview.
features keyword argument on begin_analyze_document() and begin_analyze_document_from_url().query_fields keyword argument on begin_analyze_document() and begin_analyze_document_from_url().AnalysisFeature enum with optional document analysis feature to enable.file_list keyword argument on begin_build_document_model().DocumentStyle class: similar_font_family, font_style, font_weight, color, background_color.DocumentModelAdministrationClient: begin_build_document_classifier,
list_document_classifiers, get_document_classifier, and delete_document_classifier.DocumentAnalysisClient: begin_classify_document and begin_classify_document_from_url.ClassifierDocumentTypeDetails to use with begin_build_document_classifier().QuotaDetails and property custom_neural_document_model_builds on ResourceDetails.documentClassifierBuild to OperationSummary and OperationDetails.expires_on to DocumentModelDetails and DocumentModelSummary.formulaBlock to DocumentParagraph.common_name to DocumentKeyValuePair.code to CurrencyValue.unit, city_district, state_district, suburb, house, and level to AddressValue.value_type and bool value to DocumentField.annotations, images, formulas, and barcodes to DocumentPage.DocumentAnnotation, DocumentImage, DocumentFormula, and DocumentBarcode.Corrected typing for invoice argument in begin_recognize_invoices() on async FormRecognizerClient.
invoice argument in begin_recognize_invoices() on async FormRecognizerClient.to_dict() on DocumentField where value is not returned for address and currency fields.form_type_confidence property on RecognizedForm.appearance property on FormLine.Content type image/heif is supported for document analysis and building models.
image/heif is supported for document analysis and building models.custom_document_models property on ResourceDetails.CustomDocumentModelsDetails model to represent the details of the custom document models in a given Form Recognizer resource.2022-08-31 going forward.kind property on DocumentPage.begin_build_model() to begin_build_document_model() on the DocumentModelAdministrationClient.begin_compose_model() to begin_compose_document_model() on the DocumentModelAdministrationClient.begin_copy_model_to() to begin_copy_document_model_to() on the DocumentModelAdministrationClient.list_models() to list_document_models() on the DocumentModelAdministrationClient.get_model() to get_document_model() on the DocumentModelAdministrationClient.delete_model() to delete_document_model() on the DocumentModelAdministrationClient.document_model_count and document_model_limit properties on ResourceDetails.DocumentModelOperationDetails to OperationDetails.DocumentModelOperationSummary to OperationSummary.DocumentContentElement.kind and content properties from DocumentSelectionMark.kind from DocumentWord.DocumentParagraph to __all__.Added TargetAuthorization of type dict[str, str].
TargetAuthorization of type dict[str, str].source argument to blob_container_url on begin_build_model() and made it a required keyword-only argument.begin_build_model(). build_mode is the first expected argument, followed by blob_container_url.begin_create_composed_model() on DocumentModelAdministrationClient to begin_compose_model().get_account_info() on DocumentModelAdministrationClient to get_resource_details().DocumentBuildMode to ModelBuildMode.AccountInfo model to ResourceDetails.DocTypeInfo model to DocumentTypeDetails.DocumentModelInfo model to DocumentModelSummary.DocumentModel to DocumentModelDetails.ModelOperation to DocumentModelOperationDetails.ModelOperationInfo to DocumentModelOperationSummary.model parameter to model_id on begin_analyze_document() and begin_analyze_document_from_url().continuation_token keyword from begin_analyze_document() and begin_analyze_document_from_url() on DocumentAnalysisClient and from begin_build_model(), begin_compose_model() and begin_copy_model_to() on DocumentModelAdministrationClient.get_copy_authorization() from dict[str, str] to TargetAuthorization.target parameter in begin_copy_to() from dict[str, str] to TargetAuthorization.details property on the returned DocumentModelAdministrationLROPoller and AsyncDocumentModelAdministrationLROPoller instances.Added paragraphs property on AnalyzeResult.
paragraphs property on AnalyzeResult.DocumentParagraph model to represent document paragraphs.AddressValue model to represent address fields found in documents.kind property on DocumentPage.bounding_box to polygon on BoundingRegion, DocumentContentElement, DocumentLine, DocumentSelectionMark, DocumentWord.language_code to locale on DocumentLanguage.AddressValue. TIP: Use get_model() on DocumentModelAdministrationClient to see updated prebuilt model schemas.entities property on AnalyzeResult.DocumentEntity model.Renamed begin_copy_model() to begin_copy_model_to().
begin_copy_model() to begin_copy_model_to().begin_create_composed_model(), renamed required parameter model_ids to component_model_ids.model_count and model_limit on AccountInfo to document_model_count and document_model_limit.to_dict() and from_dict() methods on DocumentField to support converting lists, dictionaries, and CurrenyValue field types to and from a dictionary.sample_copy_model.py and sample_copy_model_async.py to sample_copy_model_to.py and sample_copy_model_to_async.py under the 3.2-beta samples folder. Updated the samples to use renamed copy model method.Added new CurrencyValue model to represent the amount and currency symbol values found in documents.
CurrencyValue model to represent the amount and currency symbol values found in documents.DocumentBuildMode enum with values template and neural. These enum values can be passed in for the build_mode parameter in begin_build_model().api_version and tags properties on ModelOperation, ModelOperationInfo, DocumentModel, DocumentModelInfo.build_mode property on DocTypeInfo.tags keyword argument to begin_build_model(), begin_create_composed_model(), and get_copy_authorization().languages property on AnalyzeResult.DocumentLanguage that includes information about the detected languages found in a document.sample_analyze_read.py and sample_analyze_read_async.py under the v3.2-beta samples directory. These samples use the new prebuilt-read model added by the service.sample_analyze_tax_us_w2.py and sample_analyze_tax_us_w2_async.py under the v3.2-beta samples directory. These samples use the new prebuilt-tax.us.w2 model added by the service.build_mode to begin_build_model().CurrencyValue. TIP: Use get_model() on DocumentModelAdministrationClient to see updated prebuilt model schemas.percent_completed property to 0 when not returned with model operation information.azure-core minimum dependency version from 1.13.0 to 1.20.1.begin_build_model() to send the build_mode parameter.Added get_words() on DocumentLine.
get_words() on DocumentLine.get_words() on a DocumentLine under /samples/v3.2-beta: sample_get_words_on_document_line.py and sample_get_words_on_document_line_async.py.DocumentElement to DocumentContentElement.This version of the SDK defaults to the latest supported API version, which is currently 2021-09-30-preview.
This version of the SDK defaults to the latest supported API version, which is currently 2021-09-30-preview.
Note: Starting with version 2021-09-30-preview, a new set of clients were introduced to leverage the newest features of the Form Recognizer service. Please see the Migration Guide for detailed instructions on how to update application code from client library version 3.1.X or lower to the latest version. Also, please refer to the README for more information about the library.
DocumentAnalysisClient with begin_analyze_document and begin_analyze_document_from_url methods. Use these methods with the latest Form Recognizer
API version to analyze documents, with prebuilt and custom models.DocumentAnalysisClient: AnalyzeResult, AnalyzedDocument, BoundingRegion, DocumentElement, DocumentEntity, DocumentField, DocumentKeyValuePair, DocumentKeyValueElement, DocumentLine, DocumentPage, DocumentSelectionMark, DocumentSpan, DocumentStyle, DocumentTable, DocumentTableCell, DocumentWord.DocumentModelAdministrationClient with methods: begin_build_model, begin_create_composed_model, begin_copy_model, get_copy_authorization, get_model, delete_model, list_models, get_operation, list_operations, get_account_info, get_document_analysis_client.DocumentModelAdministrationClient: DocumentModel, DocumentModelInfo, DocTypeInfo, ModelOperation, ModelOperationInfo, AccountInfo, DocumentAnalysisError, DocumentAnalysisInnerError.DocumentAnalysisClient and DocumentModelAdministrationClient under /samples/v3.2-beta.DocumentAnalysisApiVersion to be used with DocumentAnalysisClient and DocumentModelAdministrationClient.A HttpResponseError will be immediately raised when the call quota volume is exceeded in a F0 tier Form Recognizer resource.
HttpResponseError will be immediately raised when the call quota volume is exceeded in a F0 tier Form Recognizer
resource.azure-core minimum dependency version from 1.8.2 to 1.13.0Handles invoices that do not have sub-line item fields detected.
Bug Fixes
This version of the SDK defaults to the latest supported API version, which currently is v2.1
This version of the SDK defaults to the latest supported API version, which currently is v2.1
Note: this version will be the last to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+
Breaking Changes
begin_recognize_id_documents renamed to begin_recognize_identity_documents.begin_recognize_id_documents_from_url renamed to begin_recognize_identity_documents_from_url.TextAppearance now includes the properties style_name and style_confidence that were part of the TextStyle object.TextStyle.FieldValueType enum.FieldValueType enum.New features
to_dict and from_dict methods to all of the modelsNew methods begin_recognize_id_documents and begin_recognize_id_documents_from_url introduced to the SDK. Use these methods to recognize data from ide
New features
begin_recognize_id_documents and begin_recognize_id_documents_from_url introduced to the SDK. Use these methods to recognize data from identity documents.FieldValueType enum.image/bmp now supported by custom forms and training methods.pages for business cards, receipts, custom forms, and invoices
to specify which page to process of the document.reading_order to begin_recognize_content and begin_recognize_content_from_url.Dependency Updates
msrest requirement from 0.6.12 to 0.6.21.Appearance is renamed to TextAppearance
Breaking Changes
Appearance is renamed to TextAppearanceStyle is renamed to TextStyleapi_version is no longer exposed. Pass keyword argument api_version into the client to select the
API versionDependency Updates
six requirement from 1.6 to 1.11.0.Package requires azure-core version 1.8.2 or greater
Bug Fixes
This version of the SDK defaults to the latest supported API version, which currently is v2.1-preview.
This version of the SDK defaults to the latest supported API version, which currently is v2.1-preview.
New features
begin_recognize_business_cards and begin_recognize_business_cards_from_url introduced to the SDK. Use these
methods to recognize data from business cardsbegin_recognize_invoices and begin_recognize_invoices_from_url introduced to the SDK. Use these
methods to recognize data from invoiceslocale to optionally indicate the locale of the receipt for
improved resultsFormTrainingClient by calling method begin_create_composed_model()selection_marks to FormPage which contains a list of FormSelectionMarkinclude_field_elements=True, the property field_elements on FieldData and FormTableCell will
also be populated with any selection marks found on the pagemodel_name and properties to types CustomFormModel and CustomFormModelInfomodel_name to begin_training() and begin_create_composed_model()CustomFormModelProperties that includes information like if a model is a composed modelmodel_id to CustomFormSubmodel and TrainingDocumentInfomodel_id and form_type_confidence to RecognizedFormappearance property added to FormLine to indicate the style of extracted text - like "handwriting" or "other"pages to begin_recognize_content and begin_recognize_content_from_url to specify the page
numbers to analyzebounding_box to FormTableimage/bmp now supported by recognize content and prebuilt modelslanguage to begin_recognize_content and begin_recognize_content_from_url to specify
which language to process document inDependency updates
First stable release of the azure-ai-formrecognizer client library.
First stable release of the azure-ai-formrecognizer client library.
New features
api_version can be used to specify the service API version to use. Currently only v2.0
is supported. See the enum FormRecognizerApiVersion for supported API versions.FormWord and FormLine now have attribute kind which specifies the kind of element it is, e.g. "word" or "line"The version of this package now targets the service's v2.0 API.
The version of this package now targets the service's v2.0 API.
Breaking Changes
3.0.0b1FormContentType, LengthUnit, TrainingStatus, and CustomFormModelStatusdocument_name renamed to name on TrainingDocumentInfoinclude_sub_folders renamed to include_subfolders on begin_training methodsNew features
FormField now has attribute value_type which contains the semantic data type of the field value. The options for
value_type are described in the enum FieldValueTypeFixes and improvements
HttpResponseError if operation failed during pollingFormField property value_data is now set to None if no values are returned on its FieldData.
Previously value_data returned a FieldData with all its attributes set to None in the above case.RecognizedReceipts class has been removed.
Breaking Changes
RecognizedReceipts class has been removed.begin_recognize_receipts and begin_recognize_receipts_from_url now return RecognizedForm.requested_on has been renamed to training_started_on and completed_on renamed to training_completed_on on CustomFormModel and CustomFormModelInfoFieldText has been renamed to FieldDataFormContent has been renamed to FormElementinclude_text_content has been renamed to include_field_elements for
begin_recognize_receipts, begin_recognize_receipts_from_url, begin_recognize_custom_forms, and begin_recognize_custom_forms_from_urltext_content has been renamed to field_elements on FieldData and FormTableCellFixes and improvements
text_angle was being returned out of the specified interval (-180, 180]All asynchronous long running operation methods now return an instance of an AsyncLROPoller from azure-core
Breaking Changes
AsyncLROPoller from azure-corebegin_ prefix to indicate that an AsyncLROPoller is returned:
train_model is renamed to begin_trainingrecognize_receipts is renamed to begin_recognize_receiptsrecognize_receipts_from_url is renamed to begin_recognize_receipts_from_urlrecognize_content is renamed to begin_recognize_contentrecognize_content_from_url is renamed to begin_recognize_content_from_urlrecognize_custom_forms is renamed to begin_recognize_custom_formsrecognize_custom_forms_from_url is renamed to begin_recognize_custom_forms_from_urlbegin_train_model renamed to begin_trainingtraining_files parameter of begin_training is renamed to training_files_urluse_labels parameter of begin_training is renamed to use_training_labelslist_model_infos method has been renamed to list_custom_modelsget_form_training_client from FormRecognizerClientget_form_recognizer_client to FormTrainingClientHttpResponseError is now raised if a model with status=="invalid" is returned from the begin_training methodsPageRange is renamed to FormPageRangefirst_page and last_page renamed to first_page_number and last_page_number, respectively on FormPageRangeFormField does not have a page_numberuse_training_labels is now a required positional param in the begin_training APIsstream and url parameters found on methods for FormRecognizerClient have been renamed to form and form_url, respectivelybegin_recognize_receipt methods, parameters have been renamed to receipt and receipt_urlcreated_on and last_modified are renamed to requested_on and completed_on in the
CustomFormModel and CustomFormModelInfo modelsmodels property of CustomFormModel is renamed to submodelsCustomFormSubModel is renamed to CustomFormSubmodelbegin_recognize_receipts APIs now return a list of RecognizedReceipt instead of USReceiptUSReceipt. To see how to deal with the return value of begin_recognize_receipts, see the recognize receipt samples in the samples directory for details.USReceiptItem. To see how to access the individual items on a receipt, see the recognize receipt samples in the samples directory for details.USReceiptType and the receipt_type property from RecognizedReceipt. See the recognize receipt samples in the samples directory for details.New features
azure-identity credentials now supported
page_number attribute has been added to FormTablecontinuation_token to restart the poller from a saved stateDependency updates
Bug fixed where confidence == 0.0 was erroneously getting set to 1.0
Fixes and improvements
confidence == 0.0 was erroneously getting set to 1.0__repr__ has been added to all of the modelsBreaking changes: New API design
Version (1.0.0b1) is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Form Recognizer. This library replaces the package found here: https://pypi.org/project/azure-cognitiveservices-formrecognizer/
For more information about this, and preview releases of other Azure SDK libraries, please visit https://azure.github.io/azure-sdk/releases/latest/python.html.
Breaking changes: New API design
azure.cognitiveservices.formrecognizer to azure.ai.formrecognizerfrom_urlazure.ai.formrecognizer.aio namespaceAzureKeyCredential("<api_key>") from azure.core.credentialsazure.core.exceptions.HttpResponseErrorYour coding agent can read these notes before it upgrades. Set up the MCP server →