Samples for Azure Form Recognizer client library for Python
These code samples show common scenario operations with the Azure Form Recognizer client library. The async versions of the samples require Python 3.5 or later.
These sample programs show common scenarios for the Form Recognizer client's offerings.
- Python 2.7, or 3.5 or later is required to use this package (3.5 or later if using asyncio)
- You must have an Azure subscription and an Azure Form Recognizer account to run these samples.
- Install the Azure Form Recognizer client library for Python with pip:
pip install azure-ai-formrecognizer --pre
- Clone or download this sample repository
- Open the sample folder in Visual Studio Code or your IDE of choice.
Running the samples
- Open a terminal window and
cdto the directory that the samples are saved in.
- Set the environment variables specified in the sample file you wish to run.
- Follow the usage described in the file, e.g.
Check out the API reference documentation to learn more about what you can do with the Azure Form Recognizer client library.
|Advanced Sample File Name||Description|
|sample_strongly_typing_recognized_form.py and sample_strongly_typing_recognized_form_async.py||Use the fields in your recognized forms to create an object with strongly-typed fields|
|sample_get_bounding_boxes.py and sample_get_bounding_boxes_async.py||Get info to visualize the outlines of form content and fields, which can be used for manual validation|
|sample_differentiate_output_models_trained_with_and_without_labels.py and sample_differentiate_output_models_trained_with_and_without_labels_async.py||See the differences in output when using a custom model trained with labeled data and one trained with unlabeled data|
|sample_differentiate_output_labeled_tables.py and sample_differentiate_output_labeled_tables_async.py||See the differences in output when using a custom model trained with fixed vs. dynamic table tags|