@@ -43,17 +43,23 @@ input_doc = mindee_client.source_from_file(my_file)
43
43
44
44
A URL (` HTTPS ` only):
45
45
``` python
46
- input_doc = mindee_client.source_from_url(" https://files.readme.io/a74eaa5-c8e283b-sample_invoice.jpeg" )
46
+ input_doc = mindee_client.source_from_url(
47
+ " https://files.readme.io/a74eaa5-c8e283b-sample_invoice.jpeg"
48
+ )
47
49
```
48
50
49
51
A base64-encoded string, making sure to specify the extension of the file name:
50
52
``` python
51
- input_doc = mindee_client.source_from_b64string(my_input_string, " my-file-name.ext" )
53
+ input_doc = mindee_client.source_from_b64string(
54
+ my_input_string, " my-file-name.ext"
55
+ )
52
56
```
53
57
54
58
Raw bytes, making sure to specify the extension of the file name:
55
59
``` python
56
- input_doc = mindee_client.source_from_bytes(my_raw_bytes_sequence, " my-file-name.ext" )
60
+ input_doc = mindee_client.source_from_bytes(
61
+ my_raw_bytes_sequence, " my-file-name.ext"
62
+ )
57
63
```
58
64
59
65
#### Region-Specific Documents
@@ -110,7 +116,19 @@ for field_name, field_values in result.document.fields.items():
110
116
This is an optional way of handling asynchronous APIs.
111
117
112
118
``` python
119
+ from mindee import Client, product
120
+
121
+ mindee_client = Client()
122
+ input_source = mindee_client.source_from_path(" /path/to/the/file.ext" )
123
+
124
+ result = mindee_client.enqueue_and_parse(
125
+ product.FinancialDocumentV1,
126
+ input_source,
127
+ workflow_id = " my-workflow-id" ,
128
+ rag = True ,
129
+ )
113
130
131
+ print (result.document)
114
132
```
115
133
116
134
### Additional Options
@@ -119,14 +137,9 @@ Options to pass when sending a file.
119
137
from mindee import Client, product
120
138
from mindee.client import LocalResponse
121
139
122
- # Init a new client
123
140
mindee_client = Client()
124
-
125
- # Load a file from disk
126
141
input_source = mindee_client.source_from_path(" /path/to/the/file.ext" )
127
142
128
- # Parse the file
129
-
130
143
enqueue_response = mindee_client.enqueue(
131
144
product.InternationalIdV2,
132
145
input_source,
0 commit comments