mixpeek 0.6.2__py3-none-any.whl → 0.6.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mixpeek/__init__.py +12 -8
- mixpeek/base_client.py +857 -23
- mixpeek/client.py +7 -7
- mixpeek/core/client_wrapper.py +1 -1
- mixpeek/{pipelines → pipeline}/client.py +26 -20
- mixpeek/storage/__init__.py +3 -0
- mixpeek/storage/client.py +7 -112
- mixpeek/{embed → storage/sample}/client.py +61 -129
- mixpeek/types/__init__.py +8 -0
- mixpeek/types/configs_response.py +14 -3
- mixpeek/types/destination.py +14 -3
- mixpeek/types/embedding_response.py +6 -2
- mixpeek/types/extract_response.py +39 -0
- mixpeek/types/generation_response.py +6 -4
- mixpeek/types/message.py +9 -2
- mixpeek/types/metadata.py +0 -2
- mixpeek/types/modality.py +1 -1
- mixpeek/types/model.py +9 -2
- mixpeek/types/pipeline_response.py +49 -0
- mixpeek/types/pipeline_task_response.py +32 -0
- mixpeek/types/source.py +14 -3
- mixpeek/types/source_destination_mapping.py +14 -3
- mixpeek/types/workflow_code_response.py +29 -0
- mixpeek/{users → user}/client.py +10 -10
- mixpeek/{workflows → workflow}/client.py +14 -15
- {mixpeek-0.6.2.dist-info → mixpeek-0.6.5.dist-info}/METADATA +1 -1
- {mixpeek-0.6.2.dist-info → mixpeek-0.6.5.dist-info}/RECORD +33 -36
- mixpeek/extract/client.py +0 -347
- mixpeek/generators/client.py +0 -237
- mixpeek/parse/client.py +0 -111
- mixpeek/parse_client.py +0 -14
- mixpeek/pipelines/__init__.py +0 -2
- mixpeek/users/__init__.py +0 -2
- mixpeek/workflows/__init__.py +0 -2
- /mixpeek/{embed → pipeline}/__init__.py +0 -0
- /mixpeek/{extract → storage/sample}/__init__.py +0 -0
- /mixpeek/{generators → user}/__init__.py +0 -0
- /mixpeek/{parse → workflow}/__init__.py +0 -0
- {mixpeek-0.6.2.dist-info → mixpeek-0.6.5.dist-info}/LICENSE +0 -0
- {mixpeek-0.6.2.dist-info → mixpeek-0.6.5.dist-info}/WHEEL +0 -0
mixpeek/parse/client.py
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
import typing
|
4
|
-
import urllib.parse
|
5
|
-
from json.decoder import JSONDecodeError
|
6
|
-
|
7
|
-
from ..core.api_error import ApiError
|
8
|
-
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
|
-
from ..core.jsonable_encoder import jsonable_encoder
|
10
|
-
from ..core.remove_none_from_dict import remove_none_from_dict
|
11
|
-
from ..core.request_options import RequestOptions
|
12
|
-
|
13
|
-
|
14
|
-
class ParseClient:
|
15
|
-
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
16
|
-
self._client_wrapper = client_wrapper
|
17
|
-
|
18
|
-
def parse_file(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
19
|
-
"""
|
20
|
-
Parameters:
|
21
|
-
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
22
|
-
---
|
23
|
-
from mixpeek.client import Mixpeek
|
24
|
-
|
25
|
-
client = Mixpeek(
|
26
|
-
authorization="YOUR_AUTHORIZATION",
|
27
|
-
index_id="YOUR_INDEX_ID",
|
28
|
-
api_key="YOUR_API_KEY",
|
29
|
-
)
|
30
|
-
client.parse.parse_file()
|
31
|
-
"""
|
32
|
-
_response = self._client_wrapper.httpx_client.request(
|
33
|
-
"POST",
|
34
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "parsers"),
|
35
|
-
params=jsonable_encoder(
|
36
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
37
|
-
),
|
38
|
-
json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))
|
39
|
-
if request_options is not None
|
40
|
-
else None,
|
41
|
-
headers=jsonable_encoder(
|
42
|
-
remove_none_from_dict(
|
43
|
-
{
|
44
|
-
**self._client_wrapper.get_headers(),
|
45
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
46
|
-
}
|
47
|
-
)
|
48
|
-
),
|
49
|
-
timeout=request_options.get("timeout_in_seconds")
|
50
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
51
|
-
else self._client_wrapper.get_timeout(),
|
52
|
-
retries=0,
|
53
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
54
|
-
)
|
55
|
-
if 200 <= _response.status_code < 300:
|
56
|
-
return
|
57
|
-
try:
|
58
|
-
_response_json = _response.json()
|
59
|
-
except JSONDecodeError:
|
60
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
61
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
62
|
-
|
63
|
-
|
64
|
-
class AsyncParseClient:
|
65
|
-
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
66
|
-
self._client_wrapper = client_wrapper
|
67
|
-
|
68
|
-
async def parse_file(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
69
|
-
"""
|
70
|
-
Parameters:
|
71
|
-
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
72
|
-
---
|
73
|
-
from mixpeek.client import AsyncMixpeek
|
74
|
-
|
75
|
-
client = AsyncMixpeek(
|
76
|
-
authorization="YOUR_AUTHORIZATION",
|
77
|
-
index_id="YOUR_INDEX_ID",
|
78
|
-
api_key="YOUR_API_KEY",
|
79
|
-
)
|
80
|
-
await client.parse.parse_file()
|
81
|
-
"""
|
82
|
-
_response = await self._client_wrapper.httpx_client.request(
|
83
|
-
"POST",
|
84
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "parsers"),
|
85
|
-
params=jsonable_encoder(
|
86
|
-
request_options.get("additional_query_parameters") if request_options is not None else None
|
87
|
-
),
|
88
|
-
json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))
|
89
|
-
if request_options is not None
|
90
|
-
else None,
|
91
|
-
headers=jsonable_encoder(
|
92
|
-
remove_none_from_dict(
|
93
|
-
{
|
94
|
-
**self._client_wrapper.get_headers(),
|
95
|
-
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
96
|
-
}
|
97
|
-
)
|
98
|
-
),
|
99
|
-
timeout=request_options.get("timeout_in_seconds")
|
100
|
-
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
101
|
-
else self._client_wrapper.get_timeout(),
|
102
|
-
retries=0,
|
103
|
-
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
104
|
-
)
|
105
|
-
if 200 <= _response.status_code < 300:
|
106
|
-
return
|
107
|
-
try:
|
108
|
-
_response_json = _response.json()
|
109
|
-
except JSONDecodeError:
|
110
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
111
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
mixpeek/parse_client.py
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
from .parse.client import ParseClient, \
|
2
|
-
AsyncParseClient
|
3
|
-
|
4
|
-
|
5
|
-
class MixpeekParseClient(ParseClient):
|
6
|
-
|
7
|
-
def text(self, image_filepath: str) -> None:
|
8
|
-
pass
|
9
|
-
|
10
|
-
|
11
|
-
class AsyncMixpeekParseClient(AsyncParseClient):
|
12
|
-
|
13
|
-
def text(self, image_filepath: str) -> None:
|
14
|
-
pass
|
mixpeek/pipelines/__init__.py
DELETED
mixpeek/users/__init__.py
DELETED
mixpeek/workflows/__init__.py
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|