UncountablePythonSDK 0.0.36__py3-none-any.whl → 0.0.37__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.

Potentially problematic release.


This version of UncountablePythonSDK might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: UncountablePythonSDK
3
- Version: 0.0.36
3
+ Version: 0.0.37
4
4
  Summary: Uncountable SDK
5
5
  Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
6
6
  Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
@@ -65,7 +65,7 @@ uncountable/__init__.py,sha256=8l8XWNCKsu7TG94c-xa2KHpDegvxDC2FyQISdWC763Y,89
65
65
  uncountable/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
66
  uncountable/core/__init__.py,sha256=RFv0kO6rKFf1PtBPu83hCGmxqkJamRtsgQ9_-ztw7tA,341
67
67
  uncountable/core/async_batch.py,sha256=Zo02TICZ7AK81Qa02NQ8fp8uaijQph1FEta28K3cKb0,749
68
- uncountable/core/client.py,sha256=79pqKjYuoTzKnPWLMST1jS9Gcn4nxtOzWC-VaM67QgY,9401
68
+ uncountable/core/client.py,sha256=6T8qecNK0MypHs5gD6VdW7KpiHjX7_jMNiqkmEn3CHM,9657
69
69
  uncountable/core/file_upload.py,sha256=t4cutIFB5rNN2qVCx3H0HotSjCSJSxis2_QBarDuXyc,2833
70
70
  uncountable/core/types.py,sha256=s2CjqYJpsmbC7xMwxxT7kJ_V9bwokrjjWVVjpMcQpKI,333
71
71
  uncountable/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -79,13 +79,13 @@ uncountable/integration/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
79
79
  uncountable/integration/db/connect.py,sha256=YtQHJ1DBGPhxKFRCfiXqohOYUceKSxMVOJ88aPI48Ug,181
80
80
  uncountable/integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  uncountable/integration/executors/script_executor.py,sha256=hM8E-aU8zyM6ZcBtqAqInKZ_BF93RLqEA0dU7y5FhWQ,841
82
- uncountable/types/__init__.py,sha256=VxmpZ6Kv9NrKSATBx1GZ2eAleAY8MzAh0GFMk7ERmxg,7488
82
+ uncountable/types/__init__.py,sha256=5JfNm2Ldg-uhqdeek31q80XgYJWhupJ4SfphzQ55hlw,7589
83
83
  uncountable/types/async_batch.py,sha256=tD_ncDOEGwoxIQwgqqm2cHFA71chc8sPGwnJA9feNC8,1706
84
84
  uncountable/types/async_batch_processor.py,sha256=eNXKPOh-sCiarPvreLDEu4XbieWLe_5KXmiY984eZ5I,6083
85
85
  uncountable/types/base.py,sha256=w3BRf8SAvYPlKrcJtJcQ_WhCU3A9zy0VuRTRWRFKVUA,2709
86
86
  uncountable/types/calculations.py,sha256=16J-KKMp-I8ZQUkYNmKCHfAn6DGb99cFinALcDIdGHY,562
87
87
  uncountable/types/chemical_structure.py,sha256=zQKl53DGtQQONIUHFXuwjWLQaG7FPZY7x6SBSOzkGV0,758
88
- uncountable/types/client_base.py,sha256=RZ9JvURVzfkjJIalMjC2JzQPHjcEHmOSuHOrQPDgabk,62287
88
+ uncountable/types/client_base.py,sha256=9urQDmyM-VOhNVCYn3f6oE_cHAwdLAJ7bTgEwfisVTk,63523
89
89
  uncountable/types/curves.py,sha256=qYyRntMmFNonEwTrGhquMLbgMqjyP1moQflNTP0FMec,1308
90
90
  uncountable/types/entity.py,sha256=NjMZrqBwQ7sZe_oUuJqy9IEG7dWZmFMkQQXJ0_odcnA,11637
91
91
  uncountable/types/experiment_groups.py,sha256=ZBEk06F4n98Jz3oEA09WaDmw5rqPs7iVAm_Ysr4gc_o,599
@@ -156,6 +156,7 @@ uncountable/types/api/project/get_projects.py,sha256=dMPq8CHxE4k1Vs42TmC4dp9b1jY
156
156
  uncountable/types/api/project/get_projects_data.py,sha256=HtUI5YN7S24v7o2VvNBWZkYFnGjFqJzBNoV0ojRx39E,1491
157
157
  uncountable/types/api/recipe_links/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
158
158
  uncountable/types/api/recipe_links/create_recipe_link.py,sha256=1Ok6XMGFKBIPV-uRsjvclEMCcAqyNVyrVLASLaJ8UrU,1213
159
+ uncountable/types/api/recipe_links/remove_recipe_link.py,sha256=S_6YYaxawmv28WCJx70vE2C2I_vkCVnOwCCYLywUK6c,1199
159
160
  uncountable/types/api/recipe_metadata/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
160
161
  uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py,sha256=el6Pn5XqExX66ZEEHM8CHPxnyXSMZPdfdvLBz86sAVY,1267
161
162
  uncountable/types/api/recipes/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
@@ -184,7 +185,7 @@ uncountable/types/api/recipes/unarchive_recipes.py,sha256=WcwFYbBsX2SKXnoBQ8locn
184
185
  uncountable/types/api/recipes/unlock_recipes.py,sha256=m_CC9LZW7GRVrAu9uwDTTgEZr63-dOSduBAI5Ciud2I,1103
185
186
  uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
186
187
  uncountable/types/api/triggers/run_trigger.py,sha256=9m9M8-nlGB_sAU2Qm2lWugp4h4Osqj6QpjNfU8osd1U,901
187
- UncountablePythonSDK-0.0.36.dist-info/METADATA,sha256=xTZM6AuOH9cjIcUPHzCBM8L0PcHmYXBuRXxfuY9V3Bc,1577
188
- UncountablePythonSDK-0.0.36.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
189
- UncountablePythonSDK-0.0.36.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
190
- UncountablePythonSDK-0.0.36.dist-info/RECORD,,
188
+ UncountablePythonSDK-0.0.37.dist-info/METADATA,sha256=3-tRSmnyCgOtzaRuyGhiBDX6GoHPqmEr4P7evG4BxcE,1577
189
+ UncountablePythonSDK-0.0.37.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
190
+ UncountablePythonSDK-0.0.37.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
191
+ UncountablePythonSDK-0.0.37.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.3.0)
2
+ Generator: setuptools (71.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -4,6 +4,7 @@ import typing
4
4
  from dataclasses import dataclass
5
5
  from datetime import datetime, timedelta
6
6
  from enum import StrEnum
7
+ from importlib.metadata import PackageNotFoundError, version
7
8
  from urllib.parse import urljoin
8
9
  from uuid import uuid4
9
10
 
@@ -20,6 +21,13 @@ from .types import AuthDetailsAll, AuthDetailsApiKey, AuthDetailsOAuth
20
21
 
21
22
  DT = typing.TypeVar("DT")
22
23
  UNC_REQUEST_ID_HEADER = "X-UNC-REQUEST-ID"
24
+ UNC_SDK_VERSION_HEADER = "X-UNC-SDK-VERSION"
25
+
26
+
27
+ try:
28
+ __version__ = version("uncountable")
29
+ except PackageNotFoundError:
30
+ __version__ = "unknown"
23
31
 
24
32
 
25
33
  class EndpointMethod(StrEnum):
@@ -157,7 +165,7 @@ class Client(ClientMethods):
157
165
  try:
158
166
  data = response.json()
159
167
  if "error" in data:
160
- extra_details = data["error"]
168
+ extra_details = data
161
169
  except JSONDecodeError:
162
170
  pass
163
171
  raise APIResponseError.construct_error(
@@ -247,6 +255,7 @@ class Client(ClientMethods):
247
255
  ) -> HTTPRequest:
248
256
  headers = self._build_auth_headers()
249
257
  headers[UNC_REQUEST_ID_HEADER] = request_id
258
+ headers[UNC_SDK_VERSION_HEADER] = __version__
250
259
  method = api_request.method.lower()
251
260
  data = {"data": json.dumps(serialize_for_api(api_request.args))}
252
261
  match method:
@@ -65,6 +65,7 @@ from . import recipe_tags as recipe_tags_t
65
65
  from . import recipe_workflow_steps as recipe_workflow_steps_t
66
66
  from . import recipes as recipes_t
67
67
  from .api.recipes import remove_recipe_from_project as remove_recipe_from_project_t
68
+ from .api.recipe_links import remove_recipe_link as remove_recipe_link_t
68
69
  from .api.entity import resolve_entity_ids as resolve_entity_ids_t
69
70
  from .api.outputs import resolve_output_conditions as resolve_output_conditions_t
70
71
  from . import response as response_t
@@ -154,6 +155,7 @@ __all__: list[str] = [
154
155
  "recipe_workflow_steps_t",
155
156
  "recipes_t",
156
157
  "remove_recipe_from_project_t",
158
+ "remove_recipe_link_t",
157
159
  "resolve_entity_ids_t",
158
160
  "resolve_output_conditions_t",
159
161
  "response_t",
@@ -0,0 +1,38 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from dataclasses import dataclass
11
+ from ... import async_batch as async_batch_t
12
+ from ... import identifier as identifier_t
13
+ from ... import recipe_links as recipe_links_t
14
+
15
+ __all__: list[str] = [
16
+ "Arguments",
17
+ "Data",
18
+ "ENDPOINT_METHOD",
19
+ "ENDPOINT_PATH",
20
+ ]
21
+
22
+ ENDPOINT_METHOD = "POST"
23
+ ENDPOINT_PATH = "api/external/recipe_links/remove_recipe_link"
24
+
25
+
26
+ # DO NOT MODIFY -- This file is generated by type_spec
27
+ @dataclass(kw_only=True)
28
+ class Arguments:
29
+ recipe_from_key: identifier_t.IdentifierKey
30
+ recipe_to_key: identifier_t.IdentifierKey
31
+ link_type: typing.Union[typing.Literal[recipe_links_t.RecipeLinkType.CHILD], typing.Literal[recipe_links_t.RecipeLinkType.CONTROL], typing.Literal[recipe_links_t.RecipeLinkType.USER_LINK]]
32
+
33
+
34
+ # DO NOT MODIFY -- This file is generated by type_spec
35
+ @dataclass(kw_only=True)
36
+ class Data(async_batch_t.AsyncBatchActionReturn):
37
+ pass
38
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -58,6 +58,7 @@ from uncountable.types import recipe_links as recipe_links_t
58
58
  from uncountable.types import recipe_metadata as recipe_metadata_t
59
59
  from uncountable.types import recipe_workflow_steps as recipe_workflow_steps_t
60
60
  import uncountable.types.api.recipes.remove_recipe_from_project as remove_recipe_from_project_t
61
+ import uncountable.types.api.recipe_links.remove_recipe_link as remove_recipe_link_t
61
62
  import uncountable.types.api.entity.resolve_entity_ids as resolve_entity_ids_t
62
63
  import uncountable.types.api.outputs.resolve_output_conditions as resolve_output_conditions_t
63
64
  import uncountable.types.api.triggers.run_trigger as run_trigger_t
@@ -987,6 +988,31 @@ class ClientMethods(ABC):
987
988
  )
988
989
  return self.do_request(api_request=api_request, return_type=remove_recipe_from_project_t.Data)
989
990
 
991
+ def remove_recipe_link(
992
+ self,
993
+ *,
994
+ recipe_from_key: identifier_t.IdentifierKey,
995
+ recipe_to_key: identifier_t.IdentifierKey,
996
+ link_type: typing.Union[typing.Literal[recipe_links_t.RecipeLinkType.CHILD], typing.Literal[recipe_links_t.RecipeLinkType.CONTROL], typing.Literal[recipe_links_t.RecipeLinkType.USER_LINK]],
997
+ ) -> remove_recipe_link_t.Data:
998
+ """Remove a link between two recipes. Skip if the link doesn't already exist
999
+
1000
+ :param recipe_from_key: Identifier for the recipe the link comes from
1001
+ :param recipe_to_key: Identifier for the recipe the link goes to
1002
+ :param link_type: The type of link being removed
1003
+ """
1004
+ args = remove_recipe_link_t.Arguments(
1005
+ recipe_from_key=recipe_from_key,
1006
+ recipe_to_key=recipe_to_key,
1007
+ link_type=link_type,
1008
+ )
1009
+ api_request = APIRequest(
1010
+ method=remove_recipe_link_t.ENDPOINT_METHOD,
1011
+ endpoint=remove_recipe_link_t.ENDPOINT_PATH,
1012
+ args=args,
1013
+ )
1014
+ return self.do_request(api_request=api_request, return_type=remove_recipe_link_t.Data)
1015
+
990
1016
  def resolve_entity_ids(
991
1017
  self,
992
1018
  *,