UncountablePythonSDK 0.0.14__py3-none-any.whl → 0.0.15__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.14
3
+ Version: 0.0.15
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
@@ -71,7 +71,7 @@ uncountable/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  uncountable/core/__init__.py,sha256=GCXRRhhYv-yKzqKjAij7GcNiOr90BBbgdhhpusWtmUc,100
72
72
  uncountable/core/client.py,sha256=jcJBGwe31fOqfGiUJzW_KMcfE0hax55jgVVliALBNLQ,4160
73
73
  uncountable/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- uncountable/integration/construct_client.py,sha256=fRIoxkK6HUf2HVAJkFieMvk4fAGOCgFD9y99brgXWdQ,912
74
+ uncountable/integration/construct_client.py,sha256=r6M5pnIO0fKcjf5d_AREPtWZ6AkWgcjkdu_jHQEYlT8,1084
75
75
  uncountable/integration/cron.py,sha256=TIPqMPMSMtMJTu4aXwLf6QY-OLrpmyITLDp48UIr4Ok,919
76
76
  uncountable/integration/entrypoint.py,sha256=sPtUeKJEivf0iqY-H4LHWhyeUHMZK_U4CrDj1Kw8Ld0,1395
77
77
  uncountable/integration/job.py,sha256=5QuCjeze9vtEirntP9P9hDD3LVrBn5pApDWh2IZeEiY,817
@@ -139,7 +139,7 @@ uncountable/types/api/recipes/get_recipe_output_metadata.py,sha256=L9s2ykPP4pd02
139
139
  uncountable/types/api/recipes/get_recipes_data.py,sha256=dOKokz6rJp3AiqNrF8rAZFlmJSs3ejdNIJhwKw0Utr0,5317
140
140
  uncountable/types/api/recipes/set_recipe_inputs.py,sha256=sHEwPocBucWRnnoX7nbNaFqdflxFkqdjuVydNezqluY,1326
141
141
  uncountable/types/api/recipes/set_recipe_outputs.py,sha256=QYq39TNchQ80ET1C77OE9fwhbu_HmIoEDmrQJHkkCu0,1609
142
- UncountablePythonSDK-0.0.14.dist-info/METADATA,sha256=K3rzjPqELhDb7eb2I8e9qI2B3EYiDfA_ke3XHb2vsCg,1298
143
- UncountablePythonSDK-0.0.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
- UncountablePythonSDK-0.0.14.dist-info/top_level.txt,sha256=8ga1DCSWt4Uc_XJ5cR0QrDQuyoeo2uoSzaAJdQT2KBo,36
145
- UncountablePythonSDK-0.0.14.dist-info/RECORD,,
142
+ UncountablePythonSDK-0.0.15.dist-info/METADATA,sha256=mO5xBMNi8X3Ek9wcHUAD8FD-2A3as4klF2PU6R4H2dA,1298
143
+ UncountablePythonSDK-0.0.15.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
+ UncountablePythonSDK-0.0.15.dist-info/top_level.txt,sha256=8ga1DCSWt4Uc_XJ5cR0QrDQuyoeo2uoSzaAJdQT2KBo,36
145
+ UncountablePythonSDK-0.0.15.dist-info/RECORD,,
@@ -8,13 +8,18 @@ from uncountable.integration.types import (
8
8
  )
9
9
 
10
10
 
11
- def construct_uncountable_client(
12
- profile_meta: ProfileMetadata
13
- ) -> Client:
11
+ def _get_env_var(name: str) -> str:
12
+ value = os.getenv(name)
13
+ if value is None:
14
+ raise Exception(f"environment variable {name} is missing")
15
+ return value
16
+
17
+
18
+ def construct_uncountable_client(profile_meta: ProfileMetadata) -> Client:
14
19
  match profile_meta.auth_retrieval:
15
20
  case AuthRetrievalEnv():
16
- api_id = os.getenv(f"UNC_PROFILE_{profile_meta.name.upper()}_API_ID")
17
- api_secret_key = os.getenv(
21
+ api_id = _get_env_var(f"UNC_PROFILE_{profile_meta.name.upper()}_API_ID")
22
+ api_secret_key = _get_env_var(
18
23
  f"UNC_PROFILE_{profile_meta.name.upper()}_API_SECRET_KEY"
19
24
  )
20
25