Skip to content

Commit 5e96665

Browse files
committed
📝 minor tweaks to readme
1 parent 6dbe3e2 commit 5e96665

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,23 @@ input_doc = mindee_client.source_from_file(my_file)
4343

4444
A URL (`HTTPS` only):
4545
```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+
)
4749
```
4850

4951
A base64-encoded string, making sure to specify the extension of the file name:
5052
```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+
)
5256
```
5357

5458
Raw bytes, making sure to specify the extension of the file name:
5559
```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+
)
5763
```
5864

5965
#### Region-Specific Documents
@@ -110,7 +116,19 @@ for field_name, field_values in result.document.fields.items():
110116
This is an optional way of handling asynchronous APIs.
111117

112118
```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+
)
113130

131+
print(result.document)
114132
```
115133

116134
### Additional Options
@@ -119,14 +137,9 @@ Options to pass when sending a file.
119137
from mindee import Client, product
120138
from mindee.client import LocalResponse
121139

122-
# Init a new client
123140
mindee_client = Client()
124-
125-
# Load a file from disk
126141
input_source = mindee_client.source_from_path("/path/to/the/file.ext")
127142

128-
# Parse the file
129-
130143
enqueue_response = mindee_client.enqueue(
131144
product.InternationalIdV2,
132145
input_source,

0 commit comments

Comments
 (0)