Skip to content

Commit d5115ea

Browse files
authored
♻️ use direct import of input classes (#348)
1 parent 0559c97 commit d5115ea

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/extras/code_samples/default_v2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mindee import ClientV2, InferenceParameters
1+
from mindee import ClientV2, InferenceParameters, PathInput
22

33
input_path = "/path/to/the/file.ext"
44
api_key = "MY_API_KEY"
@@ -16,7 +16,7 @@ params = InferenceParameters(
1616
)
1717

1818
# Load a file from disk
19-
input_source = mindee_client.source_from_path(input_path)
19+
input_source = PathInput(input_path)
2020

2121
# Send for processing
2222
response = mindee_client.enqueue_and_get_inference(

mindee/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
from mindee.input.local_response import LocalResponse
66
from mindee.input.page_options import PageOptions
77
from mindee.input.polling_options import PollingOptions
8+
from mindee.input.sources.base_64_input import Base64Input
9+
from mindee.input.sources.bytes_input import BytesInput
10+
from mindee.input.sources.file_input import FileInput
11+
from mindee.input.sources.path_input import PathInput
12+
from mindee.input.sources.url_input_source import UrlInputSource
813
from mindee.parsing.common.api_response import ApiResponse
914
from mindee.parsing.common.async_predict_response import AsyncPredictResponse
1015
from mindee.parsing.common.feedback_response import FeedbackResponse
@@ -18,6 +23,11 @@
1823
"Client",
1924
"ClientV2",
2025
"InferenceParameters",
26+
"FileInput",
27+
"PathInput",
28+
"BytesInput",
29+
"Base64Input",
30+
"UrlInputSource",
2131
"LocalResponse",
2232
"PageOptions",
2333
"PollingOptions",

0 commit comments

Comments
 (0)