@@ -25,25 +25,50 @@ print(result.document)
2525
2626# Print the document-level summary
2727# print(result.document.inference.prediction)
28+
29+ ```
30+
31+ You can also call this product asynchronously:
32+
33+ ``` py
34+ from mindee import Client, product, AsyncPredictResponse
35+
36+ # Init a new client
37+ mindee_client = Client(api_key = " my-api-key" )
38+
39+ # Load a file from disk
40+ input_doc = mindee_client.source_from_path(" /path/to/the/file.ext" )
41+
42+ # Load a file from disk and enqueue it.
43+ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
44+ product.FinancialDocumentV1,
45+ input_doc,
46+ )
47+
48+ # Print a brief summary of the parsed data
49+ print (result.document)
50+
2851```
2952
3053** Output (RST):**
3154``` rst
3255########
3356Document
3457########
35- :Mindee ID: 503895c6-eced-42e2-a6fc-0292b7ccf680
58+ :Mindee ID: 3859a462-e05f-4f4c-a736-febca66b9aa9
3659:Filename: default_sample.jpg
3760
3861Inference
3962#########
40- :Product: mindee/financial_document v1.6
63+ :Product: mindee/financial_document v1.9
4164:Rotation applied: Yes
4265
4366Prediction
4467==========
45- :Locale: en; USD;
68+ :Locale: en; en; USD;
4669:Invoice Number: INT-001
70+ :Receipt Number:
71+ :Document Number: INT-001
4772:Reference Numbers: 2412/2019
4873:Purchase Date: 2019-11-02
4974:Due Date: 2019-02-26
@@ -75,23 +100,25 @@ Prediction
75100:Tip and Gratuity:
76101:Purchase Time:
77102:Line Items:
78- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
79- | Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
80- +======================================+==============+==========+============+==============+==============+============+
81- | Front and rear brake cables | | 1.00 | | | 100.00 | 100.00 |
82- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
83- | New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
84- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
85- | Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
86- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
103+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
104+ | Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
105+ +======================================+==============+==========+============+==============+==============+=================+============ +
106+ | Front and rear brake cables | | 1.00 | | | 100.00 | | 100.00 |
107+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
108+ | New set of pedal arms | | 2.00 | | | 50.00 | | 25.00 |
109+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
110+ | Labor 3hrs | | 3.00 | | | 45.00 | | 15.00 |
111+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
87112
88113Page Predictions
89114================
90115
91116Page 0
92117------
93- :Locale: en; USD;
118+ :Locale: en; en; USD;
94119:Invoice Number: INT-001
120+ :Receipt Number:
121+ :Document Number: INT-001
95122:Reference Numbers: 2412/2019
96123:Purchase Date: 2019-11-02
97124:Due Date: 2019-02-26
@@ -123,15 +150,15 @@ Page 0
123150:Tip and Gratuity:
124151:Purchase Time:
125152:Line Items:
126- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
127- | Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
128- +======================================+==============+==========+============+==============+==============+============+
129- | Front and rear brake cables | | 1.00 | | | 100.00 | 100.00 |
130- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
131- | New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
132- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
133- | Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
134- +--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
153+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
154+ | Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
155+ +======================================+==============+==========+============+==============+==============+=================+============ +
156+ | Front and rear brake cables | | 1.00 | | | 100.00 | | 100.00 |
157+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
158+ | New set of pedal arms | | 2.00 | | | 50.00 | | 25.00 |
159+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
160+ | Labor 3hrs | | 3.00 | | | 45.00 | | 15.00 |
161+ +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------ +
135162```
136163
137164# Field Types
@@ -220,6 +247,7 @@ A `FinancialDocumentV1LineItem` implements the following attributes:
220247* ** tax_amount** (` float ` ): The item tax amount.
221248* ** tax_rate** (` float ` ): The item tax rate in percentage.
222249* ** total_amount** (` float ` ): The item total amount.
250+ * ** unit_measure** (` str ` ): The item unit of measure.
223251* ** unit_price** (` float ` ): The item unit price.
224252
225253# Attributes
0 commit comments