vellum-ai 0.8.28__py3-none-any.whl → 0.8.30__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
vellum/__init__.py CHANGED
@@ -53,6 +53,7 @@ from .types import (
53
53
  CodeExecutionRuntime,
54
54
  CodeExecutorInputRequest,
55
55
  CodeExecutorResponse,
56
+ CodeExecutorSecretInputRequest,
56
57
  CompilePromptDeploymentExpandMetaRequest,
57
58
  CompilePromptMeta,
58
59
  ComponentsSchemasPdfSearchResultMetaSource,
@@ -549,6 +550,7 @@ __all__ = [
549
550
  "CodeExecutionRuntime",
550
551
  "CodeExecutorInputRequest",
551
552
  "CodeExecutorResponse",
553
+ "CodeExecutorSecretInputRequest",
552
554
  "CompilePromptDeploymentExpandMetaRequest",
553
555
  "CompilePromptMeta",
554
556
  "ComponentsSchemasPdfSearchResultMetaSource",
@@ -17,7 +17,7 @@ class BaseClientWrapper:
17
17
  headers: typing.Dict[str, str] = {
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "vellum-ai",
20
- "X-Fern-SDK-Version": "v0.8.28",
20
+ "X-Fern-SDK-Version": "0.8.30",
21
21
  }
22
22
  headers["X_API_KEY"] = self.api_key
23
23
  return headers
@@ -1,7 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ...core.client_wrapper import SyncClientWrapper
4
3
  import typing
4
+ from ...core.client_wrapper import SyncClientWrapper
5
5
  from ...core.request_options import RequestOptions
6
6
  from ...types.workspace_secret_read import WorkspaceSecretRead
7
7
  from ...core.jsonable_encoder import jsonable_encoder
@@ -10,6 +10,9 @@ from json.decoder import JSONDecodeError
10
10
  from ...core.api_error import ApiError
11
11
  from ...core.client_wrapper import AsyncClientWrapper
12
12
 
13
+ # this is used as the default value for optional parameters
14
+ OMIT = typing.cast(typing.Any, ...)
15
+
13
16
 
14
17
  class WorkspaceSecretsClient:
15
18
  def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -63,6 +66,70 @@ class WorkspaceSecretsClient:
63
66
  raise ApiError(status_code=_response.status_code, body=_response.text)
64
67
  raise ApiError(status_code=_response.status_code, body=_response_json)
65
68
 
69
+ def partial_update(
70
+ self,
71
+ id: str,
72
+ *,
73
+ label: typing.Optional[str] = OMIT,
74
+ value: typing.Optional[str] = OMIT,
75
+ request_options: typing.Optional[RequestOptions] = None,
76
+ ) -> WorkspaceSecretRead:
77
+ """
78
+ Used to update a Workspace Secret given its ID or name.
79
+
80
+ Parameters
81
+ ----------
82
+ id : str
83
+ Either the Workspace Secret's ID or its unique name
84
+
85
+ label : typing.Optional[str]
86
+
87
+ value : typing.Optional[str]
88
+
89
+ request_options : typing.Optional[RequestOptions]
90
+ Request-specific configuration.
91
+
92
+ Returns
93
+ -------
94
+ WorkspaceSecretRead
95
+
96
+
97
+ Examples
98
+ --------
99
+ from vellum import Vellum
100
+
101
+ client = Vellum(
102
+ api_key="YOUR_API_KEY",
103
+ )
104
+ client.workspace_secrets.partial_update(
105
+ id="id",
106
+ )
107
+ """
108
+ _response = self._client_wrapper.httpx_client.request(
109
+ f"v1/workspace-secrets/{jsonable_encoder(id)}",
110
+ base_url=self._client_wrapper.get_environment().default,
111
+ method="PATCH",
112
+ json={
113
+ "label": label,
114
+ "value": value,
115
+ },
116
+ request_options=request_options,
117
+ omit=OMIT,
118
+ )
119
+ try:
120
+ if 200 <= _response.status_code < 300:
121
+ return typing.cast(
122
+ WorkspaceSecretRead,
123
+ parse_obj_as(
124
+ type_=WorkspaceSecretRead, # type: ignore
125
+ object_=_response.json(),
126
+ ),
127
+ )
128
+ _response_json = _response.json()
129
+ except JSONDecodeError:
130
+ raise ApiError(status_code=_response.status_code, body=_response.text)
131
+ raise ApiError(status_code=_response.status_code, body=_response_json)
132
+
66
133
 
67
134
  class AsyncWorkspaceSecretsClient:
68
135
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -125,3 +192,75 @@ class AsyncWorkspaceSecretsClient:
125
192
  except JSONDecodeError:
126
193
  raise ApiError(status_code=_response.status_code, body=_response.text)
127
194
  raise ApiError(status_code=_response.status_code, body=_response_json)
195
+
196
+ async def partial_update(
197
+ self,
198
+ id: str,
199
+ *,
200
+ label: typing.Optional[str] = OMIT,
201
+ value: typing.Optional[str] = OMIT,
202
+ request_options: typing.Optional[RequestOptions] = None,
203
+ ) -> WorkspaceSecretRead:
204
+ """
205
+ Used to update a Workspace Secret given its ID or name.
206
+
207
+ Parameters
208
+ ----------
209
+ id : str
210
+ Either the Workspace Secret's ID or its unique name
211
+
212
+ label : typing.Optional[str]
213
+
214
+ value : typing.Optional[str]
215
+
216
+ request_options : typing.Optional[RequestOptions]
217
+ Request-specific configuration.
218
+
219
+ Returns
220
+ -------
221
+ WorkspaceSecretRead
222
+
223
+
224
+ Examples
225
+ --------
226
+ import asyncio
227
+
228
+ from vellum import AsyncVellum
229
+
230
+ client = AsyncVellum(
231
+ api_key="YOUR_API_KEY",
232
+ )
233
+
234
+
235
+ async def main() -> None:
236
+ await client.workspace_secrets.partial_update(
237
+ id="id",
238
+ )
239
+
240
+
241
+ asyncio.run(main())
242
+ """
243
+ _response = await self._client_wrapper.httpx_client.request(
244
+ f"v1/workspace-secrets/{jsonable_encoder(id)}",
245
+ base_url=self._client_wrapper.get_environment().default,
246
+ method="PATCH",
247
+ json={
248
+ "label": label,
249
+ "value": value,
250
+ },
251
+ request_options=request_options,
252
+ omit=OMIT,
253
+ )
254
+ try:
255
+ if 200 <= _response.status_code < 300:
256
+ return typing.cast(
257
+ WorkspaceSecretRead,
258
+ parse_obj_as(
259
+ type_=WorkspaceSecretRead, # type: ignore
260
+ object_=_response.json(),
261
+ ),
262
+ )
263
+ _response_json = _response.json()
264
+ except JSONDecodeError:
265
+ raise ApiError(status_code=_response.status_code, body=_response.text)
266
+ raise ApiError(status_code=_response.status_code, body=_response_json)
vellum/types/__init__.py CHANGED
@@ -60,6 +60,7 @@ from .code_execution_package_request import CodeExecutionPackageRequest
60
60
  from .code_execution_runtime import CodeExecutionRuntime
61
61
  from .code_executor_input_request import CodeExecutorInputRequest
62
62
  from .code_executor_response import CodeExecutorResponse
63
+ from .code_executor_secret_input_request import CodeExecutorSecretInputRequest
63
64
  from .compile_prompt_deployment_expand_meta_request import CompilePromptDeploymentExpandMetaRequest
64
65
  from .compile_prompt_meta import CompilePromptMeta
65
66
  from .components_schemas_pdf_search_result_meta_source import ComponentsSchemasPdfSearchResultMetaSource
@@ -538,6 +539,7 @@ __all__ = [
538
539
  "CodeExecutionRuntime",
539
540
  "CodeExecutorInputRequest",
540
541
  "CodeExecutorResponse",
542
+ "CodeExecutorSecretInputRequest",
541
543
  "CompilePromptDeploymentExpandMetaRequest",
542
544
  "CompilePromptMeta",
543
545
  "ComponentsSchemasPdfSearchResultMetaSource",
@@ -9,6 +9,7 @@ from .search_results_input_request import SearchResultsInputRequest
9
9
  from .error_input_request import ErrorInputRequest
10
10
  from .array_input_request import ArrayInputRequest
11
11
  from .function_call_input_request import FunctionCallInputRequest
12
+ from .code_executor_secret_input_request import CodeExecutorSecretInputRequest
12
13
 
13
14
  CodeExecutorInputRequest = typing.Union[
14
15
  StringInputRequest,
@@ -19,4 +20,5 @@ CodeExecutorInputRequest = typing.Union[
19
20
  ErrorInputRequest,
20
21
  ArrayInputRequest,
21
22
  FunctionCallInputRequest,
23
+ CodeExecutorSecretInputRequest,
22
24
  ]
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class CodeExecutorSecretInputRequest(UniversalBaseModel):
10
+ """
11
+ A user input representing a Vellum Workspace Secret value
12
+ """
13
+
14
+ name: str = pydantic.Field()
15
+ """
16
+ The variable's name
17
+ """
18
+
19
+ type: typing.Literal["SECRET"] = "SECRET"
20
+ value: str
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.8.28
3
+ Version: 0.8.30
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -1,8 +1,8 @@
1
- vellum/__init__.py,sha256=zYlpwH3oy4YWEGkHMD8aGno4hdlSKgghpEvt3bvjM-0,33786
1
+ vellum/__init__.py,sha256=VpKptpRf7qM0dEBzmhKZSFDQPbHZxM_rHiAb_MpRTNI,33860
2
2
  vellum/client.py,sha256=oyKQasaHZqssc_CiZdvIcrGePxzg9k7GfB7_ik1jsH0,114871
3
3
  vellum/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
4
4
  vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
5
- vellum/core/client_wrapper.py,sha256=inyxfaovl6is19wUahN6_9s1KGa0kCwDU7CVka1R5mw,1891
5
+ vellum/core/client_wrapper.py,sha256=mIQucTVMwAI8O7OD6hT5Yu3dLu8WGn9HwTvusQiliAc,1890
6
6
  vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
7
7
  vellum/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
8
8
  vellum/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
@@ -64,7 +64,7 @@ vellum/resources/workflow_sandboxes/client.py,sha256=3wVQxkjrJ5bIS8fB5FpKXCP2dX3
64
64
  vellum/resources/workflows/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
65
65
  vellum/resources/workflows/client.py,sha256=ZOUOWKdQRv7tFks5c8gwU6JMSLeskYu7Om9gk8t1oCM,4639
66
66
  vellum/resources/workspace_secrets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
67
- vellum/resources/workspace_secrets/client.py,sha256=XPrvVh-Pvgt_may5ktpOQm_b1GgqP6lHit2g_5CsbTI,4022
67
+ vellum/resources/workspace_secrets/client.py,sha256=h7UzXLyTttPq1t-JZGMg1BWxypxJvBGUdqg7KGT7MK4,8027
68
68
  vellum/terraform/__init__.py,sha256=CxzT0rkV9cXwAtxZ3gv46DCRt9vBl_Sx1SOj5MJtl0Y,498
69
69
  vellum/terraform/_jsii/__init__.py,sha256=AV9B1-EC-DQ2MSTWojcpbHjahvoZxNaYeZ6aCi5SXEQ,473
70
70
  vellum/terraform/_jsii/vellum-ai_vellum@0.0.0.jsii.tgz,sha256=igWevhMxZD8GCX4KWzOG3vfQFDj5ic91sNmj2uFVwow,32056
@@ -76,7 +76,7 @@ vellum/terraform/ml_model/__init__.py,sha256=I8h1Ru-Rb-Hi_HusK6G7nJQZEKQGsAAHMmw
76
76
  vellum/terraform/provider/__init__.py,sha256=-06xKmAmknpohVzw5TD-t1bnUHta8OrQYqvMd04XM-U,12684
77
77
  vellum/terraform/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
78
78
  vellum/terraform/versions.json,sha256=45c7jjRD5i4w9DJQHs5ZqLLVXRnQwP9Rirq3mWY-xEo,56
79
- vellum/types/__init__.py,sha256=o2F5GYnijRy2aPArf1cu5jz5u7Cql76axxx7JGtZ9E8,51464
79
+ vellum/types/__init__.py,sha256=e1U-Y2pZvJOR2s87OiL0__XguJ8ab6e6dp_-SImLYGo,51581
80
80
  vellum/types/ad_hoc_execute_prompt_event.py,sha256=bCjujA2XsOgyF3bRZbcEqV2rOIymRgsLoIRtZpB14xg,607
81
81
  vellum/types/ad_hoc_expand_meta_request.py,sha256=hS8PC3hC--OKvRKi2ZFj_RJPQ1bxo2GXno8qJq1kk28,1338
82
82
  vellum/types/ad_hoc_fulfilled_prompt_execution_meta.py,sha256=Bfvf1d_dkmshxRACVM5vcxbH_7AQY23RmrrnPc0ytYY,939
@@ -127,8 +127,9 @@ vellum/types/code_execution_node_search_results_result.py,sha256=yPh94v7pgFL-4x1
127
127
  vellum/types/code_execution_node_string_result.py,sha256=uH6KO57muMko4u_xISchhvP0E-VzJfhKD_rijXgisZ8,655
128
128
  vellum/types/code_execution_package_request.py,sha256=QmFfT5BYXNZI-mVBVSJS8nxt-lrWizXqbyJ4-YXOKe0,587
129
129
  vellum/types/code_execution_runtime.py,sha256=ucMXj7mUYl9-B_KentTfRuRIeDq33PV3OV_GWKiG-lo,181
130
- vellum/types/code_executor_input_request.py,sha256=c8lJqgBrh2ar7yE8zmDnN8dc1JCqpoJ0vX8-_XW-34U,784
130
+ vellum/types/code_executor_input_request.py,sha256=wkYRtN8EV-7F1Rj9uPeUnfIvfUXxCwvHC9nqZvYARYI,899
131
131
  vellum/types/code_executor_response.py,sha256=iG3q95G7sXABhdkh81DhBYKHKrgZAFK1SvOa3Su6giM,849
132
+ vellum/types/code_executor_secret_input_request.py,sha256=-mAhESugf---UztFV1SS6UKCExVnvhaj1QSbPqZCP5Q,773
132
133
  vellum/types/compile_prompt_deployment_expand_meta_request.py,sha256=z0iMR9nLGz5h2MbqamIwUxB8EiXGvqdf0tlYAQsBFbA,1136
133
134
  vellum/types/compile_prompt_meta.py,sha256=lQOFdrhMpzMOf_hasn4vb1AKnX2VuASr-1evaugJ4ro,848
134
135
  vellum/types/components_schemas_pdf_search_result_meta_source.py,sha256=WEB3B__R6zLakrJMMn_1z9FIylBcxencQ6JHVPs7HSg,206
@@ -546,7 +547,7 @@ vellum/types/workflow_result_event_output_data_string.py,sha256=tM3kgh6tEhD0dFEb
546
547
  vellum/types/workflow_stream_event.py,sha256=Wn3Yzuy9MqWAeo8tEaXDTKDEbJoA8DdYdMVq8EKuhu8,361
547
548
  vellum/types/workspace_secret_read.py,sha256=3CnHDG72IAY0KRNvc31F0xLmhnpwjQHnDYCfQJzCxI0,714
548
549
  vellum/version.py,sha256=jq-1PlAYxN9AXuaZqbYk9ak27SgE2lw9Ia5gx1b1gVI,76
549
- vellum_ai-0.8.28.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
550
- vellum_ai-0.8.28.dist-info/METADATA,sha256=bIELfoZgsA4VpAorddt-_J3pS2_wZFZMe_3HjSWWCJg,4395
551
- vellum_ai-0.8.28.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
552
- vellum_ai-0.8.28.dist-info/RECORD,,
550
+ vellum_ai-0.8.30.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
551
+ vellum_ai-0.8.30.dist-info/METADATA,sha256=-4rTzWLoev3hnLwP3DpSQSN6umO3WZ0MgFVZQSEpgn0,4395
552
+ vellum_ai-0.8.30.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
553
+ vellum_ai-0.8.30.dist-info/RECORD,,