craft-ai-sdk 0.64.1__tar.gz → 0.65.0rc1__tar.gz

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.

Potentially problematic release.


This version of craft-ai-sdk might be problematic. Click here for more details.

Files changed (33) hide show
  1. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/PKG-INFO +1 -1
  2. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/__init__.py +1 -1
  3. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/pipeline_executions.py +1 -1
  4. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/sdk.py +1 -1
  5. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/utils/file_utils.py +18 -4
  6. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/documentation.pdf +0 -0
  7. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/pyproject.toml +1 -1
  8. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/LICENSE +0 -0
  9. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/README.md +0 -0
  10. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/constants.py +0 -0
  11. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/data_store.py +0 -0
  12. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/deployments.py +0 -0
  13. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/endpoints.py +0 -0
  14. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/environment_variables.py +0 -0
  15. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/pipeline_metrics.py +0 -0
  16. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/pipelines.py +0 -0
  17. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/resource_metrics.py +0 -0
  18. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/steps.py +0 -0
  19. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/users.py +0 -0
  20. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/core/vector_database.py +0 -0
  21. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/exceptions.py +0 -0
  22. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/io.py +0 -0
  23. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/authentication.py +0 -0
  24. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/environments.py +0 -0
  25. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/execution_context.py +0 -0
  26. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/helpers.py +0 -0
  27. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/logger.py +0 -0
  28. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/request_response_handler.py +0 -0
  29. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/types.py +0 -0
  30. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/shared/warnings.py +0 -0
  31. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/utils/__init__.py +0 -0
  32. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/utils/datetime_utils.py +0 -0
  33. {craft_ai_sdk-0.64.1 → craft_ai_sdk-0.65.0rc1}/craft_ai_sdk/utils/dict_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: craft-ai-sdk
3
- Version: 0.64.1
3
+ Version: 0.65.0rc1
4
4
  Summary: Craft AI MLOps platform SDK
5
5
  License: Apache-2.0
6
6
  Author: Craft AI
@@ -13,4 +13,4 @@ from .io import ( # noqa: F401
13
13
  )
14
14
  from .sdk import CraftAiSdk # noqa: F401
15
15
 
16
- __version__ = "0.64.1"
16
+ __version__ = "0.65.0rc1"
@@ -203,7 +203,7 @@ def list_pipeline_executions(sdk: BaseCraftAiSdk, pipeline_name):
203
203
  the run. In the case of an execution via a deployment, this is the user
204
204
  who created the deployment.
205
205
  * ``"end_date"`` (:obj:`str`): Date of completion of the pipeline
206
- execution.
206
+ execution. Can be `None` if the execution is still running.
207
207
  * ``"pipeline_name"`` (:obj:`str`): Name of the pipeline used for the
208
208
  execution.
209
209
  * ``"deployment_name"`` (:obj:`str`): Name of the deployment used for the
@@ -139,7 +139,7 @@ class CraftAiSdk(BaseCraftAiSdk):
139
139
  os.environ.get("CRAFT_AI__MULTIPART_PART_SIZE__B", str(38 * 256 * 1024))
140
140
  )
141
141
  _access_token_margin = timedelta(seconds=30)
142
- _version = "0.64.1" # Would be better to share it somewhere
142
+ _version = "0.65.0rc1" # Would be better to share it somewhere
143
143
 
144
144
  def __init__(
145
145
  self,
@@ -52,20 +52,34 @@ def convert_size(size_in_bytes: Union[int, float]):
52
52
 
53
53
  # Adapted from
54
54
  # https://gist.github.com/kazqvaizer/4cebebe5db654a414132809f9f88067b#file-multipartify-py-L13-L33
55
- def multipartify(data, parent_key=None) -> dict:
55
+ def multipartify(data, parent_key: Union[str, None] = None) -> dict:
56
+ """
57
+ Convert a nested dictionary or list into a format suitable for multipart/form-data.
58
+ This is useful for triggering endpoints that require multipart/form-data payloads.
59
+
60
+ Args:
61
+ data (:obj:`any`):
62
+ The data to convert, can be a dict, list, or a simple value.
63
+ parent_key (:obj: `str`, optional):
64
+ The key to use for the current level of the data structure.
65
+
66
+ Returns:
67
+ :obj:`dict`: A dictionary where keys are formatted for multipart/form-data.
68
+ """
69
+
56
70
  def formatter(v):
57
71
  return (None, v if v is not None else "")
58
72
 
59
- if type(data) is not dict:
73
+ if not isinstance(data, dict):
60
74
  return {parent_key: formatter(data)}
61
75
 
62
76
  converted = []
63
77
 
64
78
  for key, value in data.items():
65
79
  current_key = key if parent_key is None else f"{parent_key}[{key}]"
66
- if type(value) is dict:
80
+ if isinstance(value, dict):
67
81
  converted.extend(multipartify(value, current_key).items())
68
- elif type(value) is list:
82
+ elif isinstance(value, list):
69
83
  for ind, list_value in enumerate(value):
70
84
  iter_key = f"{current_key}[{ind}]"
71
85
  converted.extend(multipartify(list_value, iter_key).items())
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "craft-ai-sdk"
3
- version = "0.64.1"
3
+ version = "0.65.0rc1"
4
4
  description = "Craft AI MLOps platform SDK"
5
5
  license = "Apache-2.0"
6
6
  authors = ["Craft AI <contact@craft.ai>"]
File without changes