Skip to content

Commit 5b2e03e

Browse files
committed
🎨 update all products to new standard
1 parent 55ffe1b commit 5b2e03e

File tree

75 files changed

+703
-931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+703
-931
lines changed

docs/extras/guide/financial_document_v1.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ print(result.document)
3232
########
3333
Document
3434
########
35-
:Mindee ID: a6b54e2d-a7fa-4e08-8de6-6cd296f50f3d
35+
:Mindee ID: 503895c6-eced-42e2-a6fc-0292b7ccf680
3636
:Filename: default_sample.jpg
3737
3838
Inference
3939
#########
40-
:Product: mindee/financial_document v1.2
40+
:Product: mindee/financial_document v1.6
4141
:Rotation applied: Yes
4242
4343
Prediction
4444
==========
45-
:Locale: en; en; USD;
45+
:Locale: en; USD;
4646
:Invoice Number: INT-001
4747
:Reference Numbers: 2412/2019
48-
:Purchase Date: 2019-02-11
48+
:Purchase Date: 2019-11-02
4949
:Due Date: 2019-02-26
5050
:Total Net: 195.00
5151
:Total Amount: 204.75
@@ -61,8 +61,13 @@ Prediction
6161
:Supplier Address: 4490 Oak Drive Albany, NY 12210
6262
:Supplier Phone Number:
6363
:Customer Name: JESSIE M HORNE
64+
:Supplier Website:
65+
:Supplier Email:
6466
:Customer Company Registrations:
6567
:Customer Address: 2019 Redbud Drive New York, NY 10011
68+
:Customer ID: 1234567890
69+
:Shipping Address: 2019 Redbud Drive New York, NY 10011
70+
:Billing Address: 4312 Wood Road New York, NY 10031
6671
:Document Type: INVOICE
6772
:Purchase Subcategory:
6873
:Purchase Category: miscellaneous
@@ -77,18 +82,18 @@ Prediction
7782
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
7883
| New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
7984
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
80-
| Labon 3hrs | | 3.00 | | | 45.00 | 15.00 |
85+
| Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
8186
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
8287
8388
Page Predictions
8489
================
8590
8691
Page 0
8792
------
88-
:Locale: en; en; USD;
93+
:Locale: en; USD;
8994
:Invoice Number: INT-001
9095
:Reference Numbers: 2412/2019
91-
:Purchase Date: 2019-02-11
96+
:Purchase Date: 2019-11-02
9297
:Due Date: 2019-02-26
9398
:Total Net: 195.00
9499
:Total Amount: 204.75
@@ -104,8 +109,13 @@ Page 0
104109
:Supplier Address: 4490 Oak Drive Albany, NY 12210
105110
:Supplier Phone Number:
106111
:Customer Name: JESSIE M HORNE
112+
:Supplier Website:
113+
:Supplier Email:
107114
:Customer Company Registrations:
108115
:Customer Address: 2019 Redbud Drive New York, NY 10011
116+
:Customer ID: 1234567890
117+
:Shipping Address: 2019 Redbud Drive New York, NY 10011
118+
:Billing Address: 4312 Wood Road New York, NY 10031
109119
:Document Type: INVOICE
110120
:Purchase Subcategory:
111121
:Purchase Category: miscellaneous
@@ -120,7 +130,7 @@ Page 0
120130
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
121131
| New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
122132
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
123-
| Labon 3hrs | | 3.00 | | | 45.00 | 15.00 |
133+
| Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
124134
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
125135
```
126136

docs/extras/guide/invoices_v4.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ print(result.document)
3232
########
3333
Document
3434
########
35-
:Mindee ID: a9062dd1-0d34-42ab-9505-0481a8545106
35+
:Mindee ID: 5c0371d0-1433-43a4-b8fb-a3b11aaf9a0e
3636
:Filename: default_sample.jpg
3737
3838
Inference
3939
#########
40-
:Product: mindee/invoices v4.5
40+
:Product: mindee/invoices v4.6
4141
:Rotation applied: Yes
4242
4343
Prediction
@@ -46,7 +46,7 @@ Prediction
4646
:Invoice Number: 14
4747
:Reference Numbers: AD29094
4848
:Purchase Date: 2018-09-25
49-
:Due Date: 2018-09-25
49+
:Due Date:
5050
:Total Net:
5151
:Total Amount: 2608.20
5252
:Total Tax: 193.20
@@ -59,10 +59,14 @@ Prediction
5959
:Supplier Payment Details:
6060
:Supplier Name: TURNPIKE DESIGNS
6161
:Supplier Company Registrations:
62-
:Supplier Address: 156 University Ave, Toronto ON, Canada M5H 2H7
62+
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
63+
:Supplier Phone Number: 4165551212
64+
:Supplier Website:
65+
:Supplier Email: i_doi@example.com
6366
:Customer Name: JIRO DOI
6467
:Customer Company Registrations:
6568
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
69+
:Customer ID:
6670
:Shipping Address:
6771
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
6872
:Document Type: INVOICE
@@ -86,7 +90,7 @@ Page 0
8690
:Invoice Number: 14
8791
:Reference Numbers: AD29094
8892
:Purchase Date: 2018-09-25
89-
:Due Date: 2018-09-25
93+
:Due Date:
9094
:Total Net:
9195
:Total Amount: 2608.20
9296
:Total Tax: 193.20
@@ -99,10 +103,14 @@ Page 0
99103
:Supplier Payment Details:
100104
:Supplier Name: TURNPIKE DESIGNS
101105
:Supplier Company Registrations:
102-
:Supplier Address: 156 University Ave, Toronto ON, Canada M5H 2H7
106+
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
107+
:Supplier Phone Number: 4165551212
108+
:Supplier Website:
109+
:Supplier Email: i_doi@example.com
103110
:Customer Name: JIRO DOI
104111
:Customer Company Registrations:
105112
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
113+
:Customer ID:
106114
:Shipping Address:
107115
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
108116
:Document Type: INVOICE

docs/extras/guide/material_certificate_v1.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/prod
88

99
# Quick-Start
1010
```py
11-
from mindee import Client, PredictResponse, product
11+
from mindee import Client, product, AsyncPredictResponse
12+
from time import sleep
1213

1314
# Init a new client
1415
mindee_client = Client(api_key="my-api-key")
1516

1617
# Load a file from disk
1718
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
1819

19-
# Load a file from disk and parse it.
20-
# The endpoint name must be specified since it cannot be determined from the class.
21-
result: PredictResponse = mindee_client.parse(product.MaterialCertificateV1, input_doc)
20+
# Load a file from disk and enqueue it.
21+
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
22+
product.MaterialCertificateV1,
23+
input_doc,
24+
)
2225

23-
# Print a summary of the API result
26+
# Print a brief summary of the parsed data
2427
print(result.document)
25-
26-
# Print the document-level summary
27-
# print(result.document.inference.prediction)
2828
```
2929
# Field Types
3030
## Standard Fields

mindee/product/barcode_reader/barcode_reader_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class BarcodeReaderV1(Inference):
10-
"""Inference prediction for Barcode Reader, API version 1."""
10+
"""Barcode Reader API version 1 inference prediction."""
1111

1212
prediction: BarcodeReaderV1Document
1313
"""Document-level prediction."""

mindee/product/barcode_reader/barcode_reader_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class BarcodeReaderV1Document(Prediction):
8-
"""Document data for Barcode Reader, API version 1."""
8+
"""Barcode Reader API version 1.0 document data."""
99

1010
codes_1d: List[StringField]
1111
"""List of decoded 1D barcodes."""

mindee/product/cropper/cropper_v1.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
from typing import List
22

33
from mindee.parsing.common import Inference, Page, StringDict
4-
from mindee.product.cropper.cropper_v1_document import CropperV1Document
5-
from mindee.product.cropper.cropper_v1_page import CropperV1Page
4+
from mindee.product.cropper.cropper_v1_document import (
5+
CropperV1Document,
6+
)
7+
from mindee.product.cropper.cropper_v1_page import (
8+
CropperV1Page,
9+
)
610

711

812
class CropperV1(Inference):
9-
"""Inference prediction for Cropper, API version 1."""
13+
"""Cropper API version 1 inference prediction."""
1014

1115
prediction: CropperV1Document
1216
"""Document-level prediction."""

mindee/product/cropper/cropper_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
class CropperV1Document(Prediction):
5-
"""Document data for Cropper, API version 1."""
5+
"""Cropper API version 1.1 document data."""
66

77
def __str__(self) -> str:
88
return ""

mindee/product/cropper/cropper_v1_page.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
from mindee.parsing.common import StringDict, clean_out_string
44
from mindee.parsing.standard import PositionField
5-
from mindee.product.cropper.cropper_v1_document import CropperV1Document
5+
from mindee.product.cropper.cropper_v1_document import (
6+
CropperV1Document,
7+
)
68

79

810
class CropperV1Page(CropperV1Document):
9-
"""Page data for Cropper, API version 1."""
11+
"""Cropper API version 1.1 page data."""
1012

1113
cropping: List[PositionField]
1214
"""List of documents found in the image."""

mindee/product/eu/driver_license/driver_license_v1.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
from mindee.product.eu.driver_license.driver_license_v1_document import (
55
DriverLicenseV1Document,
66
)
7-
from mindee.product.eu.driver_license.driver_license_v1_page import DriverLicenseV1Page
7+
from mindee.product.eu.driver_license.driver_license_v1_page import (
8+
DriverLicenseV1Page,
9+
)
810

911

1012
class DriverLicenseV1(Inference):
11-
"""Inference prediction for Driver License, API version 1."""
13+
"""Driver License API version 1 inference prediction."""
1214

1315
prediction: DriverLicenseV1Document
1416
"""Document-level prediction."""

mindee/product/eu/driver_license/driver_license_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class DriverLicenseV1Document(Prediction):
8-
"""Document data for Driver License, API version 1."""
8+
"""Driver License API version 1.0 document data."""
99

1010
address: StringField
1111
"""EU driver license holders address"""

mindee/product/eu/driver_license/driver_license_v1_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class DriverLicenseV1Page(DriverLicenseV1Document):
11-
"""Page data for Driver License, API version 1."""
11+
"""Driver License API version 1.0 page data."""
1212

1313
photo: PositionField
1414
"""Has a photo of the EU driver license holder"""

mindee/product/eu/license_plate/license_plate_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class LicensePlateV1(Inference):
10-
"""Inference prediction for License Plate, API version 1."""
10+
"""License Plate API version 1 inference prediction."""
1111

1212
prediction: LicensePlateV1Document
1313
"""Document-level prediction."""

mindee/product/eu/license_plate/license_plate_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class LicensePlateV1Document(Prediction):
8-
"""Document data for License Plate, API version 1."""
8+
"""License Plate API version 1.1 document data."""
99

1010
license_plates: List[StringField]
1111
"""List of all license plates found in the image."""

mindee/product/financial_document/financial_document_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class FinancialDocumentV1(Inference):
10-
"""Inference prediction for Financial Document, API version 1."""
10+
"""Financial Document API version 1 inference prediction."""
1111

1212
prediction: FinancialDocumentV1Document
1313
"""Document-level prediction."""

mindee/product/financial_document/financial_document_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class FinancialDocumentV1Document(Prediction):
20-
"""Document data for Financial Document, API version 1."""
20+
"""Financial Document API version 1.6 document data."""
2121

2222
billing_address: StringField
2323
"""The customer's address used for billing."""

mindee/product/fr/bank_account_details/bank_account_details_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class BankAccountDetailsV1(Inference):
10-
"""Inference prediction for Bank Account Details, API version 1."""
10+
"""Bank Account Details API version 1 inference prediction."""
1111

1212
prediction: BankAccountDetailsV1Document
1313
"""Document-level prediction."""

mindee/product/fr/bank_account_details/bank_account_details_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class BankAccountDetailsV1Document(Prediction):
8-
"""Document data for Bank Account Details, API version 1."""
8+
"""Bank Account Details API version 1.0 document data."""
99

1010
account_holder_name: StringField
1111
"""The name of the account holder as seen on the document."""

mindee/product/fr/bank_account_details/bank_account_details_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class BankAccountDetailsV2(Inference):
10-
"""Inference prediction for Bank Account Details, API version 2."""
10+
"""Bank Account Details API version 2 inference prediction."""
1111

1212
prediction: BankAccountDetailsV2Document
1313
"""Document-level prediction."""

mindee/product/fr/bank_account_details/bank_account_details_v2_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class BankAccountDetailsV2Document(Prediction):
11-
"""Document data for Bank Account Details, API version 2."""
11+
"""Bank Account Details API version 2.0 document data."""
1212

1313
account_holders_names: StringField
1414
"""Full extraction of the account holders names."""

mindee/product/fr/carte_grise/carte_grise_v1.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from typing import List
22

33
from mindee.parsing.common import Inference, Page, StringDict
4-
from mindee.product.fr.carte_grise.carte_grise_v1_document import CarteGriseV1Document
4+
from mindee.product.fr.carte_grise.carte_grise_v1_document import (
5+
CarteGriseV1Document,
6+
)
57

68

79
class CarteGriseV1(Inference):
8-
"""Inference prediction for Carte Grise, API version 1."""
10+
"""Carte Grise API version 1 inference prediction."""
911

1012
prediction: CarteGriseV1Document
1113
"""Document-level prediction."""

mindee/product/fr/carte_grise/carte_grise_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class CarteGriseV1Document(Prediction):
8-
"""Document data for Carte Grise, API version 1."""
8+
"""Carte Grise API version 1.1 document data."""
99

1010
a: StringField
1111
"""The vehicle's license plate number."""

mindee/product/fr/carte_vitale/carte_vitale_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class CarteVitaleV1(Inference):
10-
"""Inference prediction for Carte Vitale, API version 1."""
10+
"""Carte Vitale API version 1 inference prediction."""
1111

1212
prediction: CarteVitaleV1Document
1313
"""Document-level prediction."""

mindee/product/fr/carte_vitale/carte_vitale_v1_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class CarteVitaleV1Document(Prediction):
8-
"""Document data for Carte Vitale, API version 1."""
8+
"""Carte Vitale API version 1.1 document data."""
99

1010
given_names: List[StringField]
1111
"""The given name(s) of the card holder."""

0 commit comments

Comments
 (0)