Skip to content

Commit e6d0e40

Browse files
committed
📝 better sample code
1 parent f6fec36 commit e6d0e40

File tree

66 files changed

+488
-107
lines changed

Some content is hidden

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

66 files changed

+488
-107
lines changed

docs/extras/code_samples/bank_account_details_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.fr.BankAccountDetailsV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.fr.BankAccountDetailsV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/bank_account_details_v2.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.fr.BankAccountDetailsV2, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.fr.BankAccountDetailsV2,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/bank_check_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.us.BankCheckV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.us.BankCheckV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/barcode_reader_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.BarcodeReaderV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.BarcodeReaderV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/bill_of_lading_v1_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/business_card_v1_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/carte_grise_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.fr.CarteGriseV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.fr.CarteGriseV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/cropper_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.CropperV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.CropperV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/default.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
49
mindee_client = Client(api_key="my-api-key")
510

6-
# Add the corresponding endpoint (document). Set the account_name to "mindee" if you are using OTS.
11+
# Add the corresponding endpoint (document).
12+
# Set the account_name to "mindee" if you are using OTS.
713
my_endpoint = mindee_client.create_endpoint(
814
account_name="my-account",
915
endpoint_name="my-endpoint",

docs/extras/code_samples/default_async.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, AsyncPredictResponse, product
27

38
# Init a new client
49
mindee_client = Client(api_key="my-api-key")
510

6-
# Add the corresponding endpoint (document). Set the account_name to "mindee" if you are using OTS.
11+
# Add the corresponding endpoint (document).
12+
# Set the account_name to "mindee" if you are using OTS.
713
my_endpoint = mindee_client.create_endpoint(
814
account_name="my-account",
915
endpoint_name="my-endpoint",

docs/extras/code_samples/delivery_notes_v1_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/driver_license_v1_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/energy_bill_fra_v1_async.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client
@@ -8,7 +13,7 @@ input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and enqueue it.
1015
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
11-
product.fr.EnergyBillV1,
16+
product.fr.,
1217
input_doc,
1318
)
1419

docs/extras/code_samples/expense_receipts_v5.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.ReceiptV5, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.ReceiptV5,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/expense_receipts_v5_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/financial_document_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.FinancialDocumentV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.FinancialDocumentV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/financial_document_v1_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/french_healthcard_v1_async.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client
@@ -8,7 +13,7 @@ input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and enqueue it.
1015
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
11-
product.fr.HealthCardV1,
16+
product.fr.,
1217
input_doc,
1318
)
1419

docs/extras/code_samples/idcard_fr_v1.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.fr.IdCardV1, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.fr.IdCardV1,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/idcard_fr_v2.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, PredictResponse, product
27

38
# Init a new client
@@ -7,8 +12,10 @@ mindee_client = Client(api_key="my-api-key")
712
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and parse it.
10-
# The endpoint name must be specified since it cannot be determined from the class.
11-
result: PredictResponse = mindee_client.parse(product.fr.IdCardV2, input_doc)
15+
result: PredictResponse = mindee_client.parse(
16+
product.fr.IdCardV2,
17+
input_doc,
18+
)
1219

1320
# Print a summary of the API result
1421
print(result.document)

docs/extras/code_samples/ind_passport_v1_async.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client
@@ -8,7 +13,7 @@ input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
813

914
# Load a file from disk and enqueue it.
1015
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
11-
product.ind.IndianPassportV1,
16+
product.ind.,
1217
input_doc,
1318
)
1419

docs/extras/code_samples/international_id_v2_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

docs/extras/code_samples/invoice_splitter_v1_async.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Install the Python client library by running:
3+
# pip install mindee
4+
#
5+
16
from mindee import Client, product, AsyncPredictResponse
27

38
# Init a new client

0 commit comments

Comments
 (0)