diff --git a/docs/extras/code_samples/expense_receipts_v5_async.txt b/docs/extras/code_samples/expense_receipts_v5_async.txt new file mode 100644 index 00000000..2853c469 --- /dev/null +++ b/docs/extras/code_samples/expense_receipts_v5_async.txt @@ -0,0 +1,16 @@ +from mindee import Client, product, AsyncPredictResponse + +# Init a new client +mindee_client = Client(api_key="my-api-key") + +# Load a file from disk +input_doc = mindee_client.source_from_path("/path/to/the/file.ext") + +# Load a file from disk and enqueue it. +result: AsyncPredictResponse = mindee_client.enqueue_and_parse( + product.ReceiptV5, + input_doc, +) + +# Print a brief summary of the parsed data +print(result.document) diff --git a/docs/extras/guide/energy_bill_fra_v1.md b/docs/extras/guide/energy_bill_fra_v1.md index 8ce1fa16..cfc7d236 100644 --- a/docs/extras/guide/energy_bill_fra_v1.md +++ b/docs/extras/guide/energy_bill_fra_v1.md @@ -6,8 +6,8 @@ parentDoc: 609808f773b0b90051d839de --- The Python OCR SDK supports the [Energy Bill API](https://platform.mindee.com/mindee/energy_bill_fra). -Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK. -![Energy Bill sample](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg?raw=true) +Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.pdf), we are going to illustrate how to extract the data that we want using the OCR SDK. +![Energy Bill sample](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.pdf?raw=true) # Quick-Start ```py diff --git a/docs/extras/guide/expense_receipts_v5.md b/docs/extras/guide/expense_receipts_v5.md index e17ea4a0..3e5ae023 100644 --- a/docs/extras/guide/expense_receipts_v5.md +++ b/docs/extras/guide/expense_receipts_v5.md @@ -31,6 +31,28 @@ print(result.document) ``` +You can also call this product asynchronously: + +```py +from mindee import Client, product, AsyncPredictResponse + +# Init a new client +mindee_client = Client(api_key="my-api-key") + +# Load a file from disk +input_doc = mindee_client.source_from_path("/path/to/the/file.ext") + +# Load a file from disk and enqueue it. +result: AsyncPredictResponse = mindee_client.enqueue_and_parse( + product.ReceiptV5, + input_doc, +) + +# Print a brief summary of the parsed data +print(result.document) + +``` + **Output (RST):** ```rst ######## @@ -48,7 +70,7 @@ Prediction ========== :Expense Locale: en-GB; en; GB; GBP; :Purchase Category: food -:Purchase Subcategory: +:Purchase Subcategory: restaurant :Document Type: EXPENSE RECEIPT :Purchase Date: 2016-02-26 :Purchase Time: 15:20 @@ -82,7 +104,7 @@ Page 0 ------ :Expense Locale: en-GB; en; GB; GBP; :Purchase Category: food -:Purchase Subcategory: +:Purchase Subcategory: restaurant :Document Type: EXPENSE RECEIPT :Purchase Date: 2016-02-26 :Purchase Time: 15:20 diff --git a/docs/extras/guide/financial_document_v1.md b/docs/extras/guide/financial_document_v1.md index d1907be2..04b11bd2 100644 --- a/docs/extras/guide/financial_document_v1.md +++ b/docs/extras/guide/financial_document_v1.md @@ -58,23 +58,25 @@ print(result.document) ######## Document ######## -:Mindee ID: 3859a462-e05f-4f4c-a736-febca66b9aa9 +:Mindee ID: 340ee4ae-b4da-41f0-b5ea-81ae29852b57 :Filename: default_sample.jpg Inference ######### -:Product: mindee/financial_document v1.9 +:Product: mindee/financial_document v1.10 :Rotation applied: Yes Prediction ========== :Locale: en; en; USD; :Invoice Number: INT-001 +:Purchase Order Number: 2412/2019 :Receipt Number: :Document Number: INT-001 :Reference Numbers: 2412/2019 :Purchase Date: 2019-11-02 :Due Date: 2019-02-26 +:Payment Date: 2019-02-26 :Total Net: 195.00 :Total Amount: 204.75 :Taxes: @@ -120,11 +122,13 @@ Page 0 ------ :Locale: en; en; USD; :Invoice Number: INT-001 +:Purchase Order Number: 2412/2019 :Receipt Number: :Document Number: INT-001 :Reference Numbers: 2412/2019 :Purchase Date: 2019-11-02 :Due Date: 2019-02-26 +:Payment Date: 2019-02-26 :Total Net: 195.00 :Total Amount: 204.75 :Taxes: diff --git a/docs/extras/guide/invoices_v4.md b/docs/extras/guide/invoices_v4.md index fb82b0a3..2a8b1a3e 100644 --- a/docs/extras/guide/invoices_v4.md +++ b/docs/extras/guide/invoices_v4.md @@ -58,21 +58,23 @@ print(result.document) ######## Document ######## -:Mindee ID: 372d9d08-59d8-4e1c-9622-06648c1c238b +:Mindee ID: 651b6417-bc50-496e-aa81-207219f0b9f4 :Filename: default_sample.jpg Inference ######### -:Product: mindee/invoices v4.7 +:Product: mindee/invoices v4.8 :Rotation applied: Yes Prediction ========== :Locale: en; en; CAD; :Invoice Number: 14 +:Purchase Order Number: AD29094 :Reference Numbers: AD29094 :Purchase Date: 2018-09-25 :Due Date: +:Payment Date: :Total Net: 2145.00 :Total Amount: 2608.20 :Total Tax: 193.20 @@ -88,7 +90,7 @@ Prediction :Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7 :Supplier Phone Number: 4165551212 :Supplier Website: -:Supplier Email: ldoi@example.com +:Supplier Email: j_coi@example.com :Customer Name: JIRO DOI :Customer Company Registrations: :Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada @@ -114,9 +116,11 @@ Page 0 ------ :Locale: en; en; CAD; :Invoice Number: 14 +:Purchase Order Number: AD29094 :Reference Numbers: AD29094 :Purchase Date: 2018-09-25 :Due Date: +:Payment Date: :Total Net: 2145.00 :Total Amount: 2608.20 :Total Tax: 193.20 @@ -132,7 +136,7 @@ Page 0 :Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7 :Supplier Phone Number: 4165551212 :Supplier Website: -:Supplier Email: ldoi@example.com +:Supplier Email: j_coi@example.com :Customer Name: JIRO DOI :Customer Company Registrations: :Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada