Skip to content

Commit bded6fc

Browse files
💥 ♻️ remove support for source_from_xxx() pattern
1 parent be8a9e0 commit bded6fc

46 files changed

Lines changed: 130 additions & 177 deletions

Some content is hidden

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

docs/extras/code_samples/bank_account_details_v1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

docs/extras/code_samples/bank_account_details_v2.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

docs/extras/code_samples/bank_check_v1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

docs/extras/code_samples/barcode_reader_v1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

docs/extras/code_samples/carte_grise_v1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

docs/extras/code_samples/cropper_v1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

docs/extras/code_samples/custom_v1.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from mindee.v1 import Client, PredictResponse, product
2+
from mindee import PathInput
23

34
# Init a new client
45
mindee_client = Client(api_key="my-api-key")
@@ -10,7 +11,7 @@ my_endpoint = mindee_client.create_endpoint(
1011
)
1112

1213
# Load a file from disk
13-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
14+
input_doc = PathInput("/path/to/the/file.ext")
1415

1516
# Parse the file.
1617
# The endpoint must be specified since it cannot be determined from the class.

docs/extras/code_samples/default.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
@@ -17,7 +18,7 @@ my_endpoint = mindee_client.create_endpoint(
1718
)
1819

1920
# Load a file from disk
20-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
21+
input_doc = PathInput("/path/to/the/file.ext")
2122

2223
# Parse the file.
2324
# The endpoint must be specified since it cannot be determined from the class.

docs/extras/code_samples/default_async.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55

66
from mindee.v1 import Client, AsyncPredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
@@ -17,7 +18,7 @@ my_endpoint = mindee_client.create_endpoint(
1718
)
1819

1920
# Load a file from disk
20-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
21+
input_doc = PathInput("/path/to/the/file.ext")
2122

2223
# Parse the file.
2324
# The endpoint must be specified since it cannot be determined from the class.

docs/extras/code_samples/expense_receipts_v5.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55

66
from mindee.v1 import Client, PredictResponse, product
7+
from mindee import PathInput
78

89
# Init a new client
910
mindee_client = Client(api_key="my-api-key")
1011

1112
# Load a file from disk
12-
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
13+
input_doc = PathInput("/path/to/the/file.ext")
1314

1415
# Load a file from disk and parse it.
1516
result: PredictResponse = mindee_client.parse(

0 commit comments

Comments
 (0)