From 0f3db2f3c106c0b12921973f4c7fbdcf386bbf1d Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Tue, 5 Mar 2024 15:43:34 +0100 Subject: [PATCH] :coffin: remove synchronous support for material certificate (#223) --- .../code_samples/material_certificate_v1.txt | 17 ---------- docs/extras/guide/international_id_v2.md | 31 +++++++++++++++++++ docs/extras/guide/material_certificate_v1.md | 6 +--- mindee/cli.py | 2 +- 4 files changed, 33 insertions(+), 23 deletions(-) delete mode 100644 docs/extras/code_samples/material_certificate_v1.txt diff --git a/docs/extras/code_samples/material_certificate_v1.txt b/docs/extras/code_samples/material_certificate_v1.txt deleted file mode 100644 index 47ade75f..00000000 --- a/docs/extras/code_samples/material_certificate_v1.txt +++ /dev/null @@ -1,17 +0,0 @@ -from mindee import Client, PredictResponse, product - -# 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 parse it. -# The endpoint name must be specified since it cannot be determined from the class. -result: PredictResponse = mindee_client.parse(product.MaterialCertificateV1, input_doc) - -# Print a summary of the API result -print(result.document) - -# Print the document-level summary -# print(result.document.inference.prediction) diff --git a/docs/extras/guide/international_id_v2.md b/docs/extras/guide/international_id_v2.md index 78459175..369a6b28 100644 --- a/docs/extras/guide/international_id_v2.md +++ b/docs/extras/guide/international_id_v2.md @@ -29,6 +29,37 @@ print(result.document) **Output (RST):** ```rst +######## +Document +######## +:Mindee ID: cfa20a58-20cf-43b6-8cec-9505fa69d1c2 +:Filename: default_sample.jpg + +Inference +######### +:Product: mindee/international_id v2.0 +:Rotation applied: No + +Prediction +========== +:Document Type: IDENTIFICATION_CARD +:Document Number: 12345678A +:Surnames: MUESTRA + MUESTRA +:Given Names: CARMEN +:Sex: F +:Birth Date: 1980-01-01 +:Birth Place: CAMPO DE CRIPTANA CIUDAD REAL ESPANA +:Nationality: ESP +:Personal Number: BAB1834284<44282767Q0 +:Country of Issue: ESP +:State of Issue: MADRID +:Issue Date: +:Expiration Date: 2030-01-01 +:Address: C/REAL N13, 1 DCHA COLLADO VILLALBA MADRID MADRID MADRID +:MRZ Line 1: IDESPBAB1834284<44282767Q0<<<< +:MRZ Line 2: 8001010F1301017ESP<<<<<<<<<<<3 +:MRZ Line 3: MUESTRA<MUESTRA<<CARMEN<<<<<<< ``` # Field Types diff --git a/docs/extras/guide/material_certificate_v1.md b/docs/extras/guide/material_certificate_v1.md index 26f92f51..7f6cdaa2 100644 --- a/docs/extras/guide/material_certificate_v1.md +++ b/docs/extras/guide/material_certificate_v1.md @@ -3,7 +3,7 @@ title: Material Certificate OCR Python --- The Python OCR SDK supports the [Material Certificate API](https://platform.mindee.com/mindee/material_certificate). -Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/material_certificate/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK. +The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/material_certificate/default_sample.jpg) can be used for testing purposes.  # Quick-Start @@ -27,10 +27,6 @@ print(result.document) # print(result.document.inference.prediction) ``` -**Output (RST):** -```rst -``` - # Field Types ## Standard Fields These fields are generic and used in several products. diff --git a/mindee/cli.py b/mindee/cli.py index ee4743c4..66df894f 100644 --- a/mindee/cli.py +++ b/mindee/cli.py @@ -120,7 +120,7 @@ class CommandConfig(Generic[TypeInference]): "material-certificate": CommandConfig( help="Material Certificate", doc_class=product.MaterialCertificateV1, - is_sync=True, + is_sync=False, is_async=True, ), "multi-receipts": CommandConfig(