craft-ai-sdk 0.65.1rc1__py3-none-any.whl → 0.65.2__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.
- craft_ai_sdk/__init__.py +1 -1
- craft_ai_sdk/core/deployments.py +2 -0
- craft_ai_sdk/core/endpoints.py +31 -28
- craft_ai_sdk/core/environment_variables.py +2 -1
- craft_ai_sdk/core/pipeline_executions.py +1 -2
- craft_ai_sdk/core/pipeline_metrics.py +3 -3
- craft_ai_sdk/core/pipelines.py +2 -2
- craft_ai_sdk/core/resource_metrics.py +2 -0
- craft_ai_sdk/core/steps.py +7 -7
- craft_ai_sdk/core/users.py +1 -0
- craft_ai_sdk/core/vector_database.py +2 -1
- craft_ai_sdk/io.py +2 -2
- craft_ai_sdk/sdk.py +6 -5
- craft_ai_sdk/shared/logger.py +1 -1
- craft_ai_sdk/shared/request_response_handler.py +4 -3
- craft_ai_sdk/shared/warnings.py +2 -3
- craft_ai_sdk/utils/datetime_utils.py +2 -1
- craft_ai_sdk/utils/file_utils.py +5 -6
- {craft_ai_sdk-0.65.1rc1.dist-info → craft_ai_sdk-0.65.2.dist-info}/METADATA +1 -1
- craft_ai_sdk-0.65.2.dist-info/RECORD +33 -0
- {craft_ai_sdk-0.65.1rc1.dist-info → craft_ai_sdk-0.65.2.dist-info}/entry_points.txt +1 -0
- craft_ai_sdk-0.65.1rc1.dist-info/RECORD +0 -33
- {craft_ai_sdk-0.65.1rc1.dist-info → craft_ai_sdk-0.65.2.dist-info}/LICENSE +0 -0
- {craft_ai_sdk-0.65.1rc1.dist-info → craft_ai_sdk-0.65.2.dist-info}/WHEEL +0 -0
craft_ai_sdk/__init__.py
CHANGED
craft_ai_sdk/core/deployments.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from typing import Literal, TypedDict, Union
|
|
3
|
+
|
|
3
4
|
from typing_extensions import NotRequired
|
|
4
5
|
|
|
5
6
|
from craft_ai_sdk.shared.types import Log
|
|
7
|
+
|
|
6
8
|
from ..constants import DEPLOYMENT_EXECUTION_RULES, DEPLOYMENT_MODES, DEPLOYMENT_STATUS
|
|
7
9
|
from ..exceptions import SdkException
|
|
8
10
|
from ..io import (
|
craft_ai_sdk/core/endpoints.py
CHANGED
|
@@ -5,10 +5,10 @@ from urllib.parse import urlencode
|
|
|
5
5
|
import requests
|
|
6
6
|
|
|
7
7
|
from ..sdk import BaseCraftAiSdk
|
|
8
|
+
from ..shared.authentication import use_authentication
|
|
8
9
|
from ..shared.logger import log_func_result
|
|
9
10
|
from ..shared.request_response_handler import handle_http_response
|
|
10
11
|
from .deployments import get_deployment
|
|
11
|
-
from ..shared.authentication import use_authentication
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _get_endpoint_url_path(sdk: BaseCraftAiSdk, endpoint_name: str):
|
|
@@ -36,9 +36,9 @@ class EndpointNewToken(TypedDict):
|
|
|
36
36
|
def trigger_endpoint(
|
|
37
37
|
sdk: BaseCraftAiSdk,
|
|
38
38
|
endpoint_name: str,
|
|
39
|
-
endpoint_token: str,
|
|
40
|
-
inputs: dict[str, Any],
|
|
41
|
-
wait_for_completion: Literal[True],
|
|
39
|
+
endpoint_token: Union[str, None] = None,
|
|
40
|
+
inputs: Union[dict[str, Any], None] = None,
|
|
41
|
+
wait_for_completion: Literal[True] = True,
|
|
42
42
|
) -> EndpointTriggerWithOutputs: ...
|
|
43
43
|
|
|
44
44
|
|
|
@@ -46,9 +46,9 @@ def trigger_endpoint(
|
|
|
46
46
|
def trigger_endpoint(
|
|
47
47
|
sdk: BaseCraftAiSdk,
|
|
48
48
|
endpoint_name: str,
|
|
49
|
-
endpoint_token: str,
|
|
50
|
-
inputs: dict[str, Any],
|
|
51
|
-
wait_for_completion: Literal[False],
|
|
49
|
+
endpoint_token: Union[str, None] = None,
|
|
50
|
+
inputs: Union[dict[str, Any], None] = None,
|
|
51
|
+
wait_for_completion: Literal[False] = False,
|
|
52
52
|
) -> EndpointTriggerBase: ...
|
|
53
53
|
|
|
54
54
|
|
|
@@ -97,9 +97,7 @@ def trigger_endpoint(
|
|
|
97
97
|
body[input_name] = input_value
|
|
98
98
|
|
|
99
99
|
if endpoint_token is None:
|
|
100
|
-
url =
|
|
101
|
-
f"{sdk.base_environment_api_url}" f"/deployments/{endpoint_name}/executions"
|
|
102
|
-
)
|
|
100
|
+
url = f"{sdk.base_environment_api_url}/deployments/{endpoint_name}/executions"
|
|
103
101
|
do_post = use_authentication(
|
|
104
102
|
lambda sdk, *args, **kwargs: sdk._session.post(*args, **kwargs)
|
|
105
103
|
)
|
|
@@ -167,7 +165,7 @@ def retrieve_endpoint_results(
|
|
|
167
165
|
|
|
168
166
|
url = (
|
|
169
167
|
f"{sdk.base_environment_url}"
|
|
170
|
-
f"/endpoints/{endpoint_url_path}/executions/{execution_id}"
|
|
168
|
+
f"/endpoints/v1/{endpoint_url_path}/executions/{execution_id}"
|
|
171
169
|
)
|
|
172
170
|
query = urlencode({"token": endpoint_token})
|
|
173
171
|
response = requests.get(f"{url}?{query}")
|
|
@@ -182,19 +180,27 @@ def retrieve_endpoint_results(
|
|
|
182
180
|
except KeyError:
|
|
183
181
|
return response.json()
|
|
184
182
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
"
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
183
|
+
response_data = handle_http_response(response)
|
|
184
|
+
outputs = response_data.get("outputs", {})
|
|
185
|
+
|
|
186
|
+
for key, value in outputs.items():
|
|
187
|
+
if isinstance(value, dict) and "value" in value:
|
|
188
|
+
outputs[key] = value["value"]
|
|
189
|
+
if isinstance(value, dict) and "url" in value:
|
|
190
|
+
# If the output is a file, we need to download it
|
|
191
|
+
url = f"{value['url']}?token={endpoint_token}"
|
|
192
|
+
file_response = requests.get(url)
|
|
193
|
+
if file_response.status_code == 200:
|
|
194
|
+
outputs[key] = file_response.content
|
|
195
|
+
else:
|
|
196
|
+
raise ValueError(
|
|
197
|
+
f"Failed to download file output {key}: {file_response.text}"
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
"outputs": response_data.get("outputs", []),
|
|
202
|
+
"execution_id": execution_id,
|
|
203
|
+
}
|
|
198
204
|
|
|
199
205
|
|
|
200
206
|
def generate_new_endpoint_token(
|
|
@@ -211,8 +217,5 @@ def generate_new_endpoint_token(
|
|
|
211
217
|
|
|
212
218
|
* ``"endpoint_token"`` (:obj:`str`): New endpoint token.
|
|
213
219
|
"""
|
|
214
|
-
url =
|
|
215
|
-
f"{sdk.base_environment_api_url}"
|
|
216
|
-
f"/endpoints/{endpoint_name}/generate-new-token"
|
|
217
|
-
)
|
|
220
|
+
url = f"{sdk.base_environment_api_url}/endpoints/{endpoint_name}/generate-new-token"
|
|
218
221
|
return sdk._post(url)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from typing import TypedDict
|
|
2
|
+
|
|
2
3
|
from ..sdk import BaseCraftAiSdk
|
|
3
4
|
from ..shared.logger import log_func_result
|
|
4
5
|
|
|
@@ -24,7 +25,7 @@ def create_or_update_environment_variable(
|
|
|
24
25
|
Returns:
|
|
25
26
|
None
|
|
26
27
|
"""
|
|
27
|
-
url = f"{sdk.base_environment_api_url}
|
|
28
|
+
url = f"{sdk.base_environment_api_url}/environment-variables"
|
|
28
29
|
data = {
|
|
29
30
|
"environment_variables": {
|
|
30
31
|
environment_variable_name: environment_variable_value
|
|
@@ -177,8 +177,7 @@ def _retrieve_pipeline_execution_input_value(
|
|
|
177
177
|
sdk: BaseCraftAiSdk, execution_id, input_name
|
|
178
178
|
):
|
|
179
179
|
url = (
|
|
180
|
-
f"{sdk.base_environment_api_url}"
|
|
181
|
-
f"/executions/{execution_id}/inputs/{input_name}"
|
|
180
|
+
f"{sdk.base_environment_api_url}/executions/{execution_id}/inputs/{input_name}"
|
|
182
181
|
)
|
|
183
182
|
response = sdk._get(url)
|
|
184
183
|
return response
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from typing import TypedDict, Union
|
|
2
1
|
import warnings
|
|
2
|
+
from typing import TypedDict, Union
|
|
3
3
|
|
|
4
4
|
from ..sdk import BaseCraftAiSdk
|
|
5
5
|
from ..shared.execution_context import get_execution_id
|
|
@@ -46,7 +46,7 @@ been sent",
|
|
|
46
46
|
stacklevel=2,
|
|
47
47
|
)
|
|
48
48
|
return False
|
|
49
|
-
url = f"{sdk.base_environment_api_url}
|
|
49
|
+
url = f"{sdk.base_environment_api_url}/metrics/single-value/{name}"
|
|
50
50
|
data = {"value": value, "execution_id": get_execution_id()}
|
|
51
51
|
sdk._put(url, json=data)
|
|
52
52
|
return True
|
|
@@ -81,7 +81,7 @@ been sent",
|
|
|
81
81
|
|
|
82
82
|
BATCH_SIZE = 10000
|
|
83
83
|
for i in range(0, len(values), BATCH_SIZE):
|
|
84
|
-
url = f"{sdk.base_environment_api_url}
|
|
84
|
+
url = f"{sdk.base_environment_api_url}/metrics/list-values/{name}"
|
|
85
85
|
data = {
|
|
86
86
|
"values": values[i : i + BATCH_SIZE],
|
|
87
87
|
"execution_id": get_execution_id(),
|
craft_ai_sdk/core/pipelines.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from typing import TypedDict, Union, cast
|
|
3
|
-
from typing_extensions import NotRequired
|
|
4
2
|
import warnings
|
|
3
|
+
from typing import TypedDict, Union, cast
|
|
5
4
|
|
|
6
5
|
import requests
|
|
6
|
+
from typing_extensions import NotRequired
|
|
7
7
|
|
|
8
8
|
from craft_ai_sdk.io import Input, Output
|
|
9
9
|
from craft_ai_sdk.shared.types import Log
|
craft_ai_sdk/core/steps.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
1
|
import io
|
|
3
2
|
import os
|
|
4
3
|
import tarfile
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing import TypedDict, TypeVar, Union, cast
|
|
7
6
|
|
|
8
7
|
import requests
|
|
8
|
+
from typing_extensions import NotRequired
|
|
9
9
|
|
|
10
10
|
from craft_ai_sdk.shared.types import Log
|
|
11
11
|
|
|
@@ -97,11 +97,11 @@ def _validate_create_step_parameters(
|
|
|
97
97
|
raise ValueError("The timeout must be greater than 0 or None.")
|
|
98
98
|
|
|
99
99
|
if inputs is not None:
|
|
100
|
-
if any(
|
|
100
|
+
if any(not isinstance(input_, Input) for input_ in inputs):
|
|
101
101
|
raise ValueError("'inputs' must be a list of instances of Input.")
|
|
102
102
|
|
|
103
103
|
if outputs is not None:
|
|
104
|
-
if any(
|
|
104
|
+
if any(not isinstance(output_, Output) for output_ in outputs):
|
|
105
105
|
raise ValueError("'outputs' must be a list of instances of Output.")
|
|
106
106
|
|
|
107
107
|
|
|
@@ -191,12 +191,12 @@ def _add_inputs_outputs_in_message(message, inputs, outputs):
|
|
|
191
191
|
message += "\n Inputs: "
|
|
192
192
|
for inp in inputs:
|
|
193
193
|
required_str = ", required" if inp.get("is_required", False) else ""
|
|
194
|
-
message += f
|
|
194
|
+
message += f"\n - {inp.get('name', inp.get('input_name'))} ({inp['data_type']}{required_str})" # noqa: E501
|
|
195
195
|
|
|
196
196
|
if outputs:
|
|
197
197
|
message += "\n Outputs: "
|
|
198
198
|
for output in outputs:
|
|
199
|
-
message += f
|
|
199
|
+
message += f"\n - {output.get('name', output.get('output_name'))} ({output['data_type']})" # noqa: E501
|
|
200
200
|
return message
|
|
201
201
|
|
|
202
202
|
|
craft_ai_sdk/core/users.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from typing import TypedDict
|
|
2
|
+
|
|
2
3
|
from craft_ai_sdk.shared.environments import get_environment_id
|
|
3
4
|
|
|
4
5
|
from ..sdk import BaseCraftAiSdk
|
|
@@ -41,7 +42,7 @@ def get_weaviate_client(sdk: BaseCraftAiSdk):
|
|
|
41
42
|
raise ModuleNotFoundError(
|
|
42
43
|
"The 'weaviate' package is required to use the vector database. "
|
|
43
44
|
"You can install it with 'pip install weaviate-client'."
|
|
44
|
-
)
|
|
45
|
+
) from None
|
|
45
46
|
credentials = get_vector_database_credentials(sdk)
|
|
46
47
|
|
|
47
48
|
is_secure = credentials["vector_database_url"].startswith("https://")
|
craft_ai_sdk/io.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import Any, TypedDict, cast
|
|
2
|
-
from typing_extensions import NotRequired
|
|
3
1
|
import warnings
|
|
2
|
+
from typing import Any, TypedDict, cast
|
|
4
3
|
|
|
5
4
|
from strenum import LowercaseStrEnum
|
|
5
|
+
from typing_extensions import NotRequired
|
|
6
6
|
|
|
7
7
|
from craft_ai_sdk.utils import remove_none_values
|
|
8
8
|
|
craft_ai_sdk/sdk.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
3
|
import time
|
|
4
|
-
from typing import Any
|
|
5
4
|
import warnings
|
|
6
5
|
from abc import ABC, abstractmethod
|
|
7
6
|
from datetime import timedelta
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
import jwt
|
|
10
10
|
import requests
|
|
@@ -92,8 +92,8 @@ class CraftAiSdk(BaseCraftAiSdk):
|
|
|
92
92
|
get_pipeline_execution_logs,
|
|
93
93
|
get_pipeline_execution_output,
|
|
94
94
|
list_pipeline_executions,
|
|
95
|
-
run_pipeline,
|
|
96
95
|
retrieve_pipeline_execution_outputs,
|
|
96
|
+
run_pipeline,
|
|
97
97
|
)
|
|
98
98
|
from .core.pipeline_metrics import (
|
|
99
99
|
get_list_metrics,
|
|
@@ -119,7 +119,6 @@ class CraftAiSdk(BaseCraftAiSdk):
|
|
|
119
119
|
list_steps,
|
|
120
120
|
)
|
|
121
121
|
from .core.users import get_user
|
|
122
|
-
|
|
123
122
|
from .core.vector_database import (
|
|
124
123
|
get_vector_database_credentials,
|
|
125
124
|
get_weaviate_client,
|
|
@@ -139,7 +138,7 @@ class CraftAiSdk(BaseCraftAiSdk):
|
|
|
139
138
|
os.environ.get("CRAFT_AI__MULTIPART_PART_SIZE__B", str(38 * 256 * 1024))
|
|
140
139
|
)
|
|
141
140
|
_access_token_margin = timedelta(seconds=30)
|
|
142
|
-
_version = "0.65.
|
|
141
|
+
_version = "0.65.2" # Would be better to share it somewhere
|
|
143
142
|
|
|
144
143
|
def __init__(
|
|
145
144
|
self,
|
|
@@ -216,7 +215,9 @@ class CraftAiSdk(BaseCraftAiSdk):
|
|
|
216
215
|
verbose_log = (
|
|
217
216
|
True
|
|
218
217
|
if env_verbose_log == "true"
|
|
219
|
-
else False
|
|
218
|
+
else False
|
|
219
|
+
if env_verbose_log == "false"
|
|
220
|
+
else hasattr(sys, "ps1")
|
|
220
221
|
)
|
|
221
222
|
self.verbose_log = verbose_log
|
|
222
223
|
|
craft_ai_sdk/shared/logger.py
CHANGED
|
@@ -7,7 +7,7 @@ from craft_ai_sdk.exceptions import SdkException
|
|
|
7
7
|
|
|
8
8
|
def log_action(sdk, message: str, should_log: Union[bool, Callable[[], bool]] = True):
|
|
9
9
|
if sdk.verbose_log and (should_log() if callable(should_log) else should_log):
|
|
10
|
-
print(message, file=sys.stderr)
|
|
10
|
+
print(message, file=sys.stderr) # noqa: T201
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def log_func_result(message: str, should_log: Union[bool, Callable[[], bool]] = True):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from typing import Any, Callable
|
|
2
1
|
import xml.etree.ElementTree as ET
|
|
3
2
|
from json import JSONDecodeError
|
|
3
|
+
from typing import Any, Callable
|
|
4
4
|
|
|
5
5
|
from requests import RequestException, Response
|
|
6
6
|
|
|
@@ -20,6 +20,7 @@ def handle_data_store_response(response: Response):
|
|
|
20
20
|
|
|
21
21
|
Returns:
|
|
22
22
|
:obj:`str`: Content of the response.
|
|
23
|
+
|
|
23
24
|
"""
|
|
24
25
|
if 200 <= response.status_code < 300:
|
|
25
26
|
return response.content
|
|
@@ -36,12 +37,12 @@ def handle_data_store_response(response: Response):
|
|
|
36
37
|
name=error_code,
|
|
37
38
|
additional_data=error_infos,
|
|
38
39
|
)
|
|
39
|
-
except ET.ParseError:
|
|
40
|
+
except ET.ParseError as error:
|
|
40
41
|
raise SdkException(
|
|
41
42
|
"Unable to decode response from the data store: "
|
|
42
43
|
f"Content being:\n'{response.text}'",
|
|
43
44
|
status_code=response.status_code,
|
|
44
|
-
)
|
|
45
|
+
) from error
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
def _parse_json_response(response: Response):
|
craft_ai_sdk/shared/warnings.py
CHANGED
|
@@ -13,8 +13,7 @@ MULTIPLE_EXPERIMENTAL_WARNING_JOINER = "\n * "
|
|
|
13
13
|
def _documentation_function_warning_decorator(
|
|
14
14
|
func_or_message, default_message, warning_category
|
|
15
15
|
):
|
|
16
|
-
"""
|
|
17
|
-
A general-purpose decorator for issuing function warnings. This function is
|
|
16
|
+
"""A general-purpose decorator for issuing function warnings. This function is
|
|
18
17
|
designed to be used within other decorators to add warning functionality.
|
|
19
18
|
|
|
20
19
|
Args:
|
|
@@ -26,6 +25,7 @@ def _documentation_function_warning_decorator(
|
|
|
26
25
|
warning_category (class): The category of warning to be used.
|
|
27
26
|
This should be a class derived from the Warning class,
|
|
28
27
|
such as DeprecationWarning, FutureWarning, etc.
|
|
28
|
+
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
31
|
def _get_wrapper(func, warning_message):
|
|
@@ -161,7 +161,6 @@ def deprecated(func_or_message):
|
|
|
161
161
|
(i.e. `@deprecated`), a default deprecation warning message will be used.
|
|
162
162
|
|
|
163
163
|
"""
|
|
164
|
-
|
|
165
164
|
DEFAULT_DEPRECATION_WARNING_MESSAGE = (
|
|
166
165
|
"This function is deprecated and its usage is not supported."
|
|
167
166
|
)
|
|
@@ -9,7 +9,7 @@ def datetime_to_timestamp_in_ms(dt: datetime) -> int:
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def parse_isodate(date_string: str):
|
|
12
|
-
"""
|
|
12
|
+
"""Parse a date string in ISO 8601 format and return a `datetime` object.
|
|
13
13
|
|
|
14
14
|
Args:
|
|
15
15
|
date_string (str): date in ISO 8601 format potentially ending with
|
|
@@ -17,6 +17,7 @@ def parse_isodate(date_string: str):
|
|
|
17
17
|
|
|
18
18
|
Returns:
|
|
19
19
|
:obj:`datetime.datetime`: A `datetime` corresponding to `date_string`.
|
|
20
|
+
|
|
20
21
|
"""
|
|
21
22
|
if date_string[-1] == "Z":
|
|
22
23
|
date_string = date_string.rstrip("Z")
|
craft_ai_sdk/utils/file_utils.py
CHANGED
|
@@ -39,9 +39,7 @@ def chunk_buffer(buffer: IOBase, size: int) -> Iterable[ChunkedIO]:
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
def convert_size(size_in_bytes: Union[int, float]):
|
|
42
|
-
"""
|
|
43
|
-
Convert a size in bytes to a human readable string.
|
|
44
|
-
"""
|
|
42
|
+
"""Convert a size in bytes to a human readable string."""
|
|
45
43
|
units = ["B", "KB", "MB", "GB", "TB"]
|
|
46
44
|
for unit in units: # noqa: B007
|
|
47
45
|
if size_in_bytes < 1024.0:
|
|
@@ -53,9 +51,9 @@ def convert_size(size_in_bytes: Union[int, float]):
|
|
|
53
51
|
# Adapted from
|
|
54
52
|
# https://gist.github.com/kazqvaizer/4cebebe5db654a414132809f9f88067b#file-multipartify-py-L13-L33
|
|
55
53
|
def multipartify(data, parent_key: Union[str, None] = None) -> dict:
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
"""Convert a nested dictionary or list into a format suitable for
|
|
55
|
+
multipart/form-data. This is useful for triggering endpoints that require
|
|
56
|
+
multipart/form-data payloads.
|
|
59
57
|
|
|
60
58
|
Args:
|
|
61
59
|
data (:obj:`any`):
|
|
@@ -65,6 +63,7 @@ def multipartify(data, parent_key: Union[str, None] = None) -> dict:
|
|
|
65
63
|
|
|
66
64
|
Returns:
|
|
67
65
|
:obj:`dict`: A dictionary where keys are formatted for multipart/form-data.
|
|
66
|
+
|
|
68
67
|
"""
|
|
69
68
|
|
|
70
69
|
def formatter(v):
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
craft_ai_sdk/__init__.py,sha256=1vWydEak-HrPqbB7QbawxqKXMbvJPQypdZm0T_wSKCE,363
|
|
2
|
+
craft_ai_sdk/constants.py,sha256=rH4JrGlTpbjjjNRrKhk5oScbj5G5INrcVza6Bb6kIzY,980
|
|
3
|
+
craft_ai_sdk/core/data_store.py,sha256=dlVZajXGwcI_4mzqFctHpzKO-uySIP5lvQaJy6CKwY0,9131
|
|
4
|
+
craft_ai_sdk/core/deployments.py,sha256=8IijSJjomEtiLNeYgVuwMKqqs3MD5rCMqoGKOYHGOtc,36915
|
|
5
|
+
craft_ai_sdk/core/endpoints.py,sha256=nZgkxM69cJjLpO8GHgT-yat5DkGvi2s0AfOKYbN7F7w,7355
|
|
6
|
+
craft_ai_sdk/core/environment_variables.py,sha256=CpkyneLf8UF-1QXe36Ay_RZJ8grSfbZZWBvGSQzKlLs,2221
|
|
7
|
+
craft_ai_sdk/core/pipeline_executions.py,sha256=p_vjsOMR92_6UUG5S-pgyen3V7yYHTjHBJ7pNfANe5I,18661
|
|
8
|
+
craft_ai_sdk/core/pipeline_metrics.py,sha256=IJFzAptwqjanb2Jl-XQCh0FtashEd4I2Pb51ky51cyY,7166
|
|
9
|
+
craft_ai_sdk/core/pipelines.py,sha256=9jKm5KhMt3PPfhAFjyz2OkkmoC42aOkueIr1i1hlEUM,21574
|
|
10
|
+
craft_ai_sdk/core/resource_metrics.py,sha256=ubCe6QOhud3f-EQr_TXKBsrFFaxZubqTS3fZqfV7kgg,3457
|
|
11
|
+
craft_ai_sdk/core/steps.py,sha256=JptHia3zHRdbQ-lXxg-aCgoN2S2L10AxU8D3A2Mlxl0,23363
|
|
12
|
+
craft_ai_sdk/core/users.py,sha256=q5et87q0SOMpRTBOiLX026oaEOTaY1aGqKdbUC51zbA,618
|
|
13
|
+
craft_ai_sdk/core/vector_database.py,sha256=S3h68Ej1FnHYJdc5LdLlNjobYYdmaCloSq2UaylPWko,2334
|
|
14
|
+
craft_ai_sdk/exceptions.py,sha256=IC-JfZmmmaTsbMCgirOEByRmWnatQLjKe8BErRkuwM0,1075
|
|
15
|
+
craft_ai_sdk/io.py,sha256=jeCH5nVBpaSPX3SRwj6UahhOw9z52iRTqDgX6DuSEkY,13468
|
|
16
|
+
craft_ai_sdk/sdk.py,sha256=zffoyOsjuyd-qK1hxk15rASTr7up_88SSNzWRBj1Szo,10812
|
|
17
|
+
craft_ai_sdk/shared/authentication.py,sha256=OdwtAH47tOUS-u_HhxlI8JdjZT5REr5B5cGSrX7sz00,885
|
|
18
|
+
craft_ai_sdk/shared/environments.py,sha256=LbpRK-ACpwFfN7WTuo0nrtbbi2NAXhuMRKf7YkktEYI,510
|
|
19
|
+
craft_ai_sdk/shared/execution_context.py,sha256=B2Ghq-wiUvq81q5mhsm79Oc59c8c00uQxMIpApFD03o,585
|
|
20
|
+
craft_ai_sdk/shared/helpers.py,sha256=5ZBiHlS-k1OgKejZgMlDJiYwIPYk7yg-lzeJI67poCc,1070
|
|
21
|
+
craft_ai_sdk/shared/logger.py,sha256=pGZ_Zb4yH_KyaTdEYx1c4wd1OCa9I8xjKeLiktStwtk,1336
|
|
22
|
+
craft_ai_sdk/shared/request_response_handler.py,sha256=ZDivkVWRXBt241mO6o6BQhgsFBLjQv9OsjKjFgSqCOM,4014
|
|
23
|
+
craft_ai_sdk/shared/types.py,sha256=ByoR5ePdoFK4idC9bJLBvZH1kTcGg74cfxumi3o9Oks,89
|
|
24
|
+
craft_ai_sdk/shared/warnings.py,sha256=sMbC75qqnHySOxDe1PHmyRyp_dA25GS3MGF9lTS91VY,6817
|
|
25
|
+
craft_ai_sdk/utils/__init__.py,sha256=A0sLCXSPD1Z3q2GP1uLDjvif4ivOr__Hzg9RQysEuqo,420
|
|
26
|
+
craft_ai_sdk/utils/datetime_utils.py,sha256=yYP5HVdI879WXxQCajPTnas1pWrwInOxMux-mxqQNQM,734
|
|
27
|
+
craft_ai_sdk/utils/dict_utils.py,sha256=1HQ3A14SN48XPFDmQleujGAgksmkjIs3hyPLpwhwh24,748
|
|
28
|
+
craft_ai_sdk/utils/file_utils.py,sha256=o10-CDt4qzgCJNPykvlNrL6WTouhVLY8C8BVpHJYt18,2795
|
|
29
|
+
craft_ai_sdk-0.65.2.dist-info/LICENSE,sha256=_2oYRJic9lZK05LceuJ9aZZw5mPHYc1WQhJiVS-oGFU,10754
|
|
30
|
+
craft_ai_sdk-0.65.2.dist-info/METADATA,sha256=64SHt5U-b2kHoJomxpCVoX2qcWYe90ozLkMVIwU7tHM,1676
|
|
31
|
+
craft_ai_sdk-0.65.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
32
|
+
craft_ai_sdk-0.65.2.dist-info/entry_points.txt,sha256=QC96WcXvvUfLMRgFD-l_y7_TgC9SqZybLs9EQ8dsGiQ,417
|
|
33
|
+
craft_ai_sdk-0.65.2.dist-info/RECORD,,
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
craft_ai_sdk/__init__.py,sha256=LKC3wQ8kjNOMh58Iz8rjxYiE3RXwQ_yUT5SYVXyT13A,366
|
|
2
|
-
craft_ai_sdk/constants.py,sha256=rH4JrGlTpbjjjNRrKhk5oScbj5G5INrcVza6Bb6kIzY,980
|
|
3
|
-
craft_ai_sdk/core/data_store.py,sha256=dlVZajXGwcI_4mzqFctHpzKO-uySIP5lvQaJy6CKwY0,9131
|
|
4
|
-
craft_ai_sdk/core/deployments.py,sha256=yc1O_9IQlqUDkKQGGkt0lyNFsFO4Tm53ymxFpAp9BQU,36913
|
|
5
|
-
craft_ai_sdk/core/endpoints.py,sha256=cB4MgEr5L0XVS_QtE1ewsFqq586NZoxqeI-ZINSS9R8,7034
|
|
6
|
-
craft_ai_sdk/core/environment_variables.py,sha256=FYxwWqz8XdmxWuJLI3MP9QOObWwly3P4k6lon-KHUmU,2224
|
|
7
|
-
craft_ai_sdk/core/pipeline_executions.py,sha256=OSol4Tk7UzALDFUCYwdHs8y5LuMz2mkEA_X9epl_FHg,18673
|
|
8
|
-
craft_ai_sdk/core/pipeline_metrics.py,sha256=cyDuhQCGVRMruo-ZGGd9vfQB0rbNu8Fs1sQxnfk6Aow,7174
|
|
9
|
-
craft_ai_sdk/core/pipelines.py,sha256=QrpCH9Yn6SA92xyDfF0Te-iumtkhlNRLtQAiztqcl6o,21574
|
|
10
|
-
craft_ai_sdk/core/resource_metrics.py,sha256=jwxDZJIhj28rpmFJKopt_1O0X58TGjUThRpAeMvVz1Y,3455
|
|
11
|
-
craft_ai_sdk/core/steps.py,sha256=86fPAWXsvk7npW5nSwBviGtAmGOugBTo9y3wz1d5vTM,23367
|
|
12
|
-
craft_ai_sdk/core/users.py,sha256=OBwOrjE2hrqQde28ZItGxNDj52dhKY-mxabkbLaMnGQ,617
|
|
13
|
-
craft_ai_sdk/core/vector_database.py,sha256=JQsz7Rj8HL9tmB8y4lSsAd3IPnuVMX2LpAK1z8yrz9M,2323
|
|
14
|
-
craft_ai_sdk/exceptions.py,sha256=IC-JfZmmmaTsbMCgirOEByRmWnatQLjKe8BErRkuwM0,1075
|
|
15
|
-
craft_ai_sdk/io.py,sha256=4BlUV2Rf3Y8YXMC2mRdUqbI8EzvbgkrLB-cbcrv2gco,13468
|
|
16
|
-
craft_ai_sdk/sdk.py,sha256=pgvuHa2aBlbm2krv6mylqd5_z6aquCU76yIMHp4XuTg,10784
|
|
17
|
-
craft_ai_sdk/shared/authentication.py,sha256=OdwtAH47tOUS-u_HhxlI8JdjZT5REr5B5cGSrX7sz00,885
|
|
18
|
-
craft_ai_sdk/shared/environments.py,sha256=LbpRK-ACpwFfN7WTuo0nrtbbi2NAXhuMRKf7YkktEYI,510
|
|
19
|
-
craft_ai_sdk/shared/execution_context.py,sha256=B2Ghq-wiUvq81q5mhsm79Oc59c8c00uQxMIpApFD03o,585
|
|
20
|
-
craft_ai_sdk/shared/helpers.py,sha256=5ZBiHlS-k1OgKejZgMlDJiYwIPYk7yg-lzeJI67poCc,1070
|
|
21
|
-
craft_ai_sdk/shared/logger.py,sha256=eOpuKI46WPeeQCDhale7Tcw0tqRuU0EjpF73HQL8CAs,1322
|
|
22
|
-
craft_ai_sdk/shared/request_response_handler.py,sha256=fJJkceGo01VXR90dkpRvd4N7luikaBwCmLzeqduXjEI,3993
|
|
23
|
-
craft_ai_sdk/shared/types.py,sha256=ByoR5ePdoFK4idC9bJLBvZH1kTcGg74cfxumi3o9Oks,89
|
|
24
|
-
craft_ai_sdk/shared/warnings.py,sha256=KElNEY5lvY3PeAPJBXUw6KIa5GrYqpewFtSzIZN0drQ,6822
|
|
25
|
-
craft_ai_sdk/utils/__init__.py,sha256=A0sLCXSPD1Z3q2GP1uLDjvif4ivOr__Hzg9RQysEuqo,420
|
|
26
|
-
craft_ai_sdk/utils/datetime_utils.py,sha256=ziWQ2Xa_ypKIm50F_1R5OtubXSNlM4JWbFUeh7qjwpE,672
|
|
27
|
-
craft_ai_sdk/utils/dict_utils.py,sha256=1HQ3A14SN48XPFDmQleujGAgksmkjIs3hyPLpwhwh24,748
|
|
28
|
-
craft_ai_sdk/utils/file_utils.py,sha256=yuOx2POHotJ3wG0h44SneZ6vcnuWtd8Khk28BRIP4O0,2805
|
|
29
|
-
craft_ai_sdk-0.65.1rc1.dist-info/LICENSE,sha256=_2oYRJic9lZK05LceuJ9aZZw5mPHYc1WQhJiVS-oGFU,10754
|
|
30
|
-
craft_ai_sdk-0.65.1rc1.dist-info/METADATA,sha256=V-nStl6qhmVWjbsOmRH5jEKo_vxj1zL8izDmrSpj1P8,1679
|
|
31
|
-
craft_ai_sdk-0.65.1rc1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
32
|
-
craft_ai_sdk-0.65.1rc1.dist-info/entry_points.txt,sha256=eV9YD0zCAb88_wNMDV99sRxVKVC-WOQF3b1Pepaytcg,385
|
|
33
|
-
craft_ai_sdk-0.65.1rc1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|