agenta 0.32.0a1__py3-none-any.whl → 0.32.0a2__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 agenta might be problematic. Click here for more details.

Files changed (31) hide show
  1. agenta/client/backend/__init__.py +4 -8
  2. agenta/client/backend/apps/client.py +68 -68
  3. agenta/client/backend/bases/client.py +10 -10
  4. agenta/client/backend/client.py +96 -88
  5. agenta/client/backend/containers/client.py +70 -28
  6. agenta/client/backend/environments/client.py +8 -8
  7. agenta/client/backend/evaluations/client.py +46 -46
  8. agenta/client/backend/evaluators/client.py +32 -32
  9. agenta/client/backend/human_evaluations/__init__.py +1 -0
  10. agenta/client/backend/human_evaluations/client.py +1696 -0
  11. agenta/client/backend/testsets/client.py +28 -28
  12. agenta/client/backend/types/__init__.py +3 -7
  13. agenta/client/backend/types/{evaluation_scenario_score_update.py → delete_evaluation.py} +3 -3
  14. agenta/client/backend/variants/client.py +54 -42
  15. agenta/sdk/decorators/routing.py +32 -10
  16. agenta/sdk/decorators/tracing.py +16 -4
  17. agenta/sdk/litellm/litellm.py +44 -8
  18. agenta/sdk/litellm/mockllm.py +2 -2
  19. agenta/sdk/litellm/mocks/__init__.py +9 -3
  20. agenta/sdk/middleware/auth.py +5 -1
  21. agenta/sdk/middleware/config.py +10 -2
  22. agenta/sdk/tracing/exporters.py +0 -1
  23. agenta/sdk/tracing/inline.py +26 -30
  24. agenta/sdk/types.py +12 -9
  25. {agenta-0.32.0a1.dist-info → agenta-0.32.0a2.dist-info}/METADATA +9 -11
  26. {agenta-0.32.0a1.dist-info → agenta-0.32.0a2.dist-info}/RECORD +28 -29
  27. agenta/client/backend/types/human_evaluation_scenario_update.py +0 -30
  28. agenta/client/backend/types/human_evaluation_update.py +0 -22
  29. agenta/client/backend/types/new_human_evaluation.py +0 -27
  30. {agenta-0.32.0a1.dist-info → agenta-0.32.0a2.dist-info}/WHEEL +0 -0
  31. {agenta-0.32.0a1.dist-info → agenta-0.32.0a2.dist-info}/entry_points.txt +0 -0
@@ -10,6 +10,7 @@ from .scopes.client import ScopesClient
10
10
  from .apps.client import AppsClient
11
11
  from .variants.client import VariantsClient
12
12
  from .evaluations.client import EvaluationsClient
13
+ from .human_evaluations.client import HumanEvaluationsClient
13
14
  from .evaluators.client import EvaluatorsClient
14
15
  from .testsets.client import TestsetsClient
15
16
  from .containers.client import ContainersClient
@@ -41,6 +42,7 @@ from .scopes.client import AsyncScopesClient
41
42
  from .apps.client import AsyncAppsClient
42
43
  from .variants.client import AsyncVariantsClient
43
44
  from .evaluations.client import AsyncEvaluationsClient
45
+ from .human_evaluations.client import AsyncHumanEvaluationsClient
44
46
  from .evaluators.client import AsyncEvaluatorsClient
45
47
  from .testsets.client import AsyncTestsetsClient
46
48
  from .containers.client import AsyncContainersClient
@@ -117,6 +119,9 @@ class AgentaApi:
117
119
  self.apps = AppsClient(client_wrapper=self._client_wrapper)
118
120
  self.variants = VariantsClient(client_wrapper=self._client_wrapper)
119
121
  self.evaluations = EvaluationsClient(client_wrapper=self._client_wrapper)
122
+ self.human_evaluations = HumanEvaluationsClient(
123
+ client_wrapper=self._client_wrapper
124
+ )
120
125
  self.evaluators = EvaluatorsClient(client_wrapper=self._client_wrapper)
121
126
  self.testsets = TestsetsClient(client_wrapper=self._client_wrapper)
122
127
  self.containers = ContainersClient(client_wrapper=self._client_wrapper)
@@ -134,10 +139,10 @@ class AgentaApi:
134
139
  List all API keys associated with the authenticated user.
135
140
 
136
141
  Args:
137
- request (Request): The incoming request object.
142
+ request (Request): The incoming request object.
138
143
 
139
144
  Returns:
140
- List[ListAPIKeysResponse]: A list of API Keys associated with the user.
145
+ List[ListAPIKeysResponse]: A list of API Keys associated with the user.
141
146
 
142
147
  Parameters
143
148
  ----------
@@ -185,10 +190,10 @@ class AgentaApi:
185
190
  Creates an API key for a user.
186
191
 
187
192
  Args:
188
- request (Request): The request object containing the user ID in the request state.
193
+ request (Request): The request object containing the user ID in the request state.
189
194
 
190
195
  Returns:
191
- str: The created API key.
196
+ str: The created API key.
192
197
 
193
198
  Parameters
194
199
  ----------
@@ -239,14 +244,14 @@ class AgentaApi:
239
244
  Delete an API key with the given key prefix for the authenticated user.
240
245
 
241
246
  Args:
242
- key_prefix (str): The prefix of the API key to be deleted.
243
- request (Request): The incoming request object.
247
+ key_prefix (str): The prefix of the API key to be deleted.
248
+ request (Request): The incoming request object.
244
249
 
245
250
  Returns:
246
- dict: A dictionary containing a success message upon successful deletion.
251
+ dict: A dictionary containing a success message upon successful deletion.
247
252
 
248
253
  Raises:
249
- HTTPException: If the API key is not found or does not belong to the user.
254
+ HTTPException: If the API key is not found or does not belong to the user.
250
255
 
251
256
  Parameters
252
257
  ----------
@@ -310,7 +315,10 @@ class AgentaApi:
310
315
  """
311
316
  This Function is called by the CLI and is used to validate an API key provided by a user in agenta init setup.
312
317
  Returns:
313
- bool: True. If the request reaches this point, the API key is valid.
318
+
319
+
320
+
321
+ bool: True. If the request reaches this point, the API key is valid.
314
322
 
315
323
  Parameters
316
324
  ----------
@@ -372,13 +380,13 @@ class AgentaApi:
372
380
  Returns a list of organizations associated with the user's session.
373
381
 
374
382
  Args:
375
- stoken_session (SessionContainer): The user's session token.
383
+ stoken_session (SessionContainer): The user's session token.
376
384
 
377
385
  Returns:
378
- list[Organization]: A list of organizations associated with the user's session.
386
+ list[Organization]: A list of organizations associated with the user's session.
379
387
 
380
388
  Raises:
381
- HTTPException: If there is an error retrieving the organizations from the database.
389
+ HTTPException: If there is an error retrieving the organizations from the database.
382
390
 
383
391
  Parameters
384
392
  ----------
@@ -549,11 +557,11 @@ class AgentaApi:
549
557
  Get an organization's details.
550
558
 
551
559
  Raises:
552
- HTTPException: _description_
553
- Permission Denied
560
+ HTTPException: _description_
561
+ Permission Denied
554
562
 
555
563
  Returns:
556
- OrganizationDB Instance
564
+ OrganizationDB Instance
557
565
 
558
566
  Parameters
559
567
  ----------
@@ -777,12 +785,12 @@ class AgentaApi:
777
785
  Resend an invitation to a user to an Organization.
778
786
 
779
787
  Raises:
780
- HTTPException: _description_; status_code: 500
781
- HTTPException: Invitation not found or has expired; status_code: 400
782
- HTTPException: You already belong to this organization; status_code: 400
788
+ HTTPException: _description_; status_code: 500
789
+ HTTPException: Invitation not found or has expired; status_code: 400
790
+ HTTPException: You already belong to this organization; status_code: 400
783
791
 
784
792
  Returns:
785
- JSONResponse: Resent invitation to user; status_code: 200
793
+ JSONResponse: Resent invitation to user; status_code: 200
786
794
 
787
795
  Parameters
788
796
  ----------
@@ -863,12 +871,12 @@ class AgentaApi:
863
871
  Accept an invitation to a workspace.
864
872
 
865
873
  Raises:
866
- HTTPException: _description_; status_code: 500
867
- HTTPException: Invitation not found or has expired; status_code: 400
868
- HTTPException: You already belong to this organization; status_code: 400
874
+ HTTPException: _description_; status_code: 500
875
+ HTTPException: Invitation not found or has expired; status_code: 400
876
+ HTTPException: You already belong to this organization; status_code: 400
869
877
 
870
878
  Returns:
871
- JSONResponse: Accepted invitation to workspace; status_code: 200
879
+ JSONResponse: Accepted invitation to workspace; status_code: 200
872
880
 
873
881
  Parameters
874
882
  ----------
@@ -1112,10 +1120,10 @@ class AgentaApi:
1112
1120
  Returns a list of all available workspace roles.
1113
1121
 
1114
1122
  Returns:
1115
- List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.
1123
+ List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.
1116
1124
 
1117
1125
  Raises:
1118
- HTTPException: If an error occurs while retrieving the workspace roles.
1126
+ HTTPException: If an error occurs while retrieving the workspace roles.
1119
1127
 
1120
1128
  Parameters
1121
1129
  ----------
@@ -1165,10 +1173,10 @@ class AgentaApi:
1165
1173
  Returns a list of all available workspace permissions.
1166
1174
 
1167
1175
  Returns:
1168
- List[Permission]: A list of Permission objects representing the available workspace permissions.
1176
+ List[Permission]: A list of Permission objects representing the available workspace permissions.
1169
1177
 
1170
1178
  Raises:
1171
- HTTPException: If there is an error retrieving the workspace permissions.
1179
+ HTTPException: If there is an error retrieving the workspace permissions.
1172
1180
 
1173
1181
  Parameters
1174
1182
  ----------
@@ -1222,16 +1230,16 @@ class AgentaApi:
1222
1230
  Assigns a role to a user in a workspace.
1223
1231
 
1224
1232
  Args:
1225
- payload (UserRole): The payload containing the organization id, user email, and role to assign.
1226
- workspace_id (str): The ID of the workspace.
1227
- request (Request): The FastAPI request object.
1233
+ payload (UserRole): The payload containing the organization id, user email, and role to assign.
1234
+ workspace_id (str): The ID of the workspace.
1235
+ request (Request): The FastAPI request object.
1228
1236
 
1229
1237
  Returns:
1230
- bool: True if the role was successfully assigned, False otherwise.
1238
+ bool: True if the role was successfully assigned, False otherwise.
1231
1239
 
1232
1240
  Raises:
1233
- HTTPException: If the user does not have permission to perform this action.
1234
- HTTPException: If there is an error assigning the role to the user.
1241
+ HTTPException: If the user does not have permission to perform this action.
1242
+ HTTPException: If there is an error assigning the role to the user.
1235
1243
 
1236
1244
  Parameters
1237
1245
  ----------
@@ -1316,18 +1324,18 @@ class AgentaApi:
1316
1324
  Delete a role assignment from a user in a workspace.
1317
1325
 
1318
1326
  Args:
1319
- workspace_id (str): The ID of the workspace.
1320
- email (str): The email of the user to remove the role from.
1321
- org_id (str): The ID of the organization.
1322
- role (str): The role to remove from the user.
1323
- request (Request): The FastAPI request object.
1327
+ workspace_id (str): The ID of the workspace.
1328
+ email (str): The email of the user to remove the role from.
1329
+ org_id (str): The ID of the organization.
1330
+ role (str): The role to remove from the user.
1331
+ request (Request): The FastAPI request object.
1324
1332
 
1325
1333
  Returns:
1326
- bool: True if the role assignment was successfully deleted.
1334
+ bool: True if the role assignment was successfully deleted.
1327
1335
 
1328
1336
  Raises:
1329
- HTTPException: If there is an error in the request or the user does not have permission to perform the action.
1330
- HTTPException: If there is an error in updating the user's roles.
1337
+ HTTPException: If there is an error in the request or the user does not have permission to perform the action.
1338
+ HTTPException: If there is an error in updating the user's roles.
1331
1339
 
1332
1340
  Parameters
1333
1341
  ----------
@@ -1408,17 +1416,14 @@ class AgentaApi:
1408
1416
  Remove a user from a workspace.
1409
1417
 
1410
1418
  Parameters:
1411
-
1412
1419
  - payload (UserRole): The payload containing the user email and organization ID.
1413
1420
  - workspace_id (str): The ID of the workspace.
1414
1421
  - request (Request): The FastAPI request object.
1415
1422
 
1416
1423
  Returns:
1417
-
1418
1424
  - WorkspaceResponse: The updated workspace.
1419
1425
 
1420
1426
  Raises:
1421
-
1422
1427
  - HTTPException: If the user does not have permission to perform this action.
1423
1428
  - HTTPException: If there is an error during the removal process.
1424
1429
 
@@ -1658,6 +1663,9 @@ class AsyncAgentaApi:
1658
1663
  self.apps = AsyncAppsClient(client_wrapper=self._client_wrapper)
1659
1664
  self.variants = AsyncVariantsClient(client_wrapper=self._client_wrapper)
1660
1665
  self.evaluations = AsyncEvaluationsClient(client_wrapper=self._client_wrapper)
1666
+ self.human_evaluations = AsyncHumanEvaluationsClient(
1667
+ client_wrapper=self._client_wrapper
1668
+ )
1661
1669
  self.evaluators = AsyncEvaluatorsClient(client_wrapper=self._client_wrapper)
1662
1670
  self.testsets = AsyncTestsetsClient(client_wrapper=self._client_wrapper)
1663
1671
  self.containers = AsyncContainersClient(client_wrapper=self._client_wrapper)
@@ -1675,10 +1683,10 @@ class AsyncAgentaApi:
1675
1683
  List all API keys associated with the authenticated user.
1676
1684
 
1677
1685
  Args:
1678
- request (Request): The incoming request object.
1686
+ request (Request): The incoming request object.
1679
1687
 
1680
1688
  Returns:
1681
- List[ListAPIKeysResponse]: A list of API Keys associated with the user.
1689
+ List[ListAPIKeysResponse]: A list of API Keys associated with the user.
1682
1690
 
1683
1691
  Parameters
1684
1692
  ----------
@@ -1734,10 +1742,10 @@ class AsyncAgentaApi:
1734
1742
  Creates an API key for a user.
1735
1743
 
1736
1744
  Args:
1737
- request (Request): The request object containing the user ID in the request state.
1745
+ request (Request): The request object containing the user ID in the request state.
1738
1746
 
1739
1747
  Returns:
1740
- str: The created API key.
1748
+ str: The created API key.
1741
1749
 
1742
1750
  Parameters
1743
1751
  ----------
@@ -1796,14 +1804,14 @@ class AsyncAgentaApi:
1796
1804
  Delete an API key with the given key prefix for the authenticated user.
1797
1805
 
1798
1806
  Args:
1799
- key_prefix (str): The prefix of the API key to be deleted.
1800
- request (Request): The incoming request object.
1807
+ key_prefix (str): The prefix of the API key to be deleted.
1808
+ request (Request): The incoming request object.
1801
1809
 
1802
1810
  Returns:
1803
- dict: A dictionary containing a success message upon successful deletion.
1811
+ dict: A dictionary containing a success message upon successful deletion.
1804
1812
 
1805
1813
  Raises:
1806
- HTTPException: If the API key is not found or does not belong to the user.
1814
+ HTTPException: If the API key is not found or does not belong to the user.
1807
1815
 
1808
1816
  Parameters
1809
1817
  ----------
@@ -1875,7 +1883,10 @@ class AsyncAgentaApi:
1875
1883
  """
1876
1884
  This Function is called by the CLI and is used to validate an API key provided by a user in agenta init setup.
1877
1885
  Returns:
1878
- bool: True. If the request reaches this point, the API key is valid.
1886
+
1887
+
1888
+
1889
+ bool: True. If the request reaches this point, the API key is valid.
1879
1890
 
1880
1891
  Parameters
1881
1892
  ----------
@@ -1945,13 +1956,13 @@ class AsyncAgentaApi:
1945
1956
  Returns a list of organizations associated with the user's session.
1946
1957
 
1947
1958
  Args:
1948
- stoken_session (SessionContainer): The user's session token.
1959
+ stoken_session (SessionContainer): The user's session token.
1949
1960
 
1950
1961
  Returns:
1951
- list[Organization]: A list of organizations associated with the user's session.
1962
+ list[Organization]: A list of organizations associated with the user's session.
1952
1963
 
1953
1964
  Raises:
1954
- HTTPException: If there is an error retrieving the organizations from the database.
1965
+ HTTPException: If there is an error retrieving the organizations from the database.
1955
1966
 
1956
1967
  Parameters
1957
1968
  ----------
@@ -2146,11 +2157,11 @@ class AsyncAgentaApi:
2146
2157
  Get an organization's details.
2147
2158
 
2148
2159
  Raises:
2149
- HTTPException: _description_
2150
- Permission Denied
2160
+ HTTPException: _description_
2161
+ Permission Denied
2151
2162
 
2152
2163
  Returns:
2153
- OrganizationDB Instance
2164
+ OrganizationDB Instance
2154
2165
 
2155
2166
  Parameters
2156
2167
  ----------
@@ -2398,12 +2409,12 @@ class AsyncAgentaApi:
2398
2409
  Resend an invitation to a user to an Organization.
2399
2410
 
2400
2411
  Raises:
2401
- HTTPException: _description_; status_code: 500
2402
- HTTPException: Invitation not found or has expired; status_code: 400
2403
- HTTPException: You already belong to this organization; status_code: 400
2412
+ HTTPException: _description_; status_code: 500
2413
+ HTTPException: Invitation not found or has expired; status_code: 400
2414
+ HTTPException: You already belong to this organization; status_code: 400
2404
2415
 
2405
2416
  Returns:
2406
- JSONResponse: Resent invitation to user; status_code: 200
2417
+ JSONResponse: Resent invitation to user; status_code: 200
2407
2418
 
2408
2419
  Parameters
2409
2420
  ----------
@@ -2492,12 +2503,12 @@ class AsyncAgentaApi:
2492
2503
  Accept an invitation to a workspace.
2493
2504
 
2494
2505
  Raises:
2495
- HTTPException: _description_; status_code: 500
2496
- HTTPException: Invitation not found or has expired; status_code: 400
2497
- HTTPException: You already belong to this organization; status_code: 400
2506
+ HTTPException: _description_; status_code: 500
2507
+ HTTPException: Invitation not found or has expired; status_code: 400
2508
+ HTTPException: You already belong to this organization; status_code: 400
2498
2509
 
2499
2510
  Returns:
2500
- JSONResponse: Accepted invitation to workspace; status_code: 200
2511
+ JSONResponse: Accepted invitation to workspace; status_code: 200
2501
2512
 
2502
2513
  Parameters
2503
2514
  ----------
@@ -2765,10 +2776,10 @@ class AsyncAgentaApi:
2765
2776
  Returns a list of all available workspace roles.
2766
2777
 
2767
2778
  Returns:
2768
- List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.
2779
+ List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.
2769
2780
 
2770
2781
  Raises:
2771
- HTTPException: If an error occurs while retrieving the workspace roles.
2782
+ HTTPException: If an error occurs while retrieving the workspace roles.
2772
2783
 
2773
2784
  Parameters
2774
2785
  ----------
@@ -2826,10 +2837,10 @@ class AsyncAgentaApi:
2826
2837
  Returns a list of all available workspace permissions.
2827
2838
 
2828
2839
  Returns:
2829
- List[Permission]: A list of Permission objects representing the available workspace permissions.
2840
+ List[Permission]: A list of Permission objects representing the available workspace permissions.
2830
2841
 
2831
2842
  Raises:
2832
- HTTPException: If there is an error retrieving the workspace permissions.
2843
+ HTTPException: If there is an error retrieving the workspace permissions.
2833
2844
 
2834
2845
  Parameters
2835
2846
  ----------
@@ -2891,16 +2902,16 @@ class AsyncAgentaApi:
2891
2902
  Assigns a role to a user in a workspace.
2892
2903
 
2893
2904
  Args:
2894
- payload (UserRole): The payload containing the organization id, user email, and role to assign.
2895
- workspace_id (str): The ID of the workspace.
2896
- request (Request): The FastAPI request object.
2905
+ payload (UserRole): The payload containing the organization id, user email, and role to assign.
2906
+ workspace_id (str): The ID of the workspace.
2907
+ request (Request): The FastAPI request object.
2897
2908
 
2898
2909
  Returns:
2899
- bool: True if the role was successfully assigned, False otherwise.
2910
+ bool: True if the role was successfully assigned, False otherwise.
2900
2911
 
2901
2912
  Raises:
2902
- HTTPException: If the user does not have permission to perform this action.
2903
- HTTPException: If there is an error assigning the role to the user.
2913
+ HTTPException: If the user does not have permission to perform this action.
2914
+ HTTPException: If there is an error assigning the role to the user.
2904
2915
 
2905
2916
  Parameters
2906
2917
  ----------
@@ -2993,18 +3004,18 @@ class AsyncAgentaApi:
2993
3004
  Delete a role assignment from a user in a workspace.
2994
3005
 
2995
3006
  Args:
2996
- workspace_id (str): The ID of the workspace.
2997
- email (str): The email of the user to remove the role from.
2998
- org_id (str): The ID of the organization.
2999
- role (str): The role to remove from the user.
3000
- request (Request): The FastAPI request object.
3007
+ workspace_id (str): The ID of the workspace.
3008
+ email (str): The email of the user to remove the role from.
3009
+ org_id (str): The ID of the organization.
3010
+ role (str): The role to remove from the user.
3011
+ request (Request): The FastAPI request object.
3001
3012
 
3002
3013
  Returns:
3003
- bool: True if the role assignment was successfully deleted.
3014
+ bool: True if the role assignment was successfully deleted.
3004
3015
 
3005
3016
  Raises:
3006
- HTTPException: If there is an error in the request or the user does not have permission to perform the action.
3007
- HTTPException: If there is an error in updating the user's roles.
3017
+ HTTPException: If there is an error in the request or the user does not have permission to perform the action.
3018
+ HTTPException: If there is an error in updating the user's roles.
3008
3019
 
3009
3020
  Parameters
3010
3021
  ----------
@@ -3093,17 +3104,14 @@ class AsyncAgentaApi:
3093
3104
  Remove a user from a workspace.
3094
3105
 
3095
3106
  Parameters:
3096
-
3097
3107
  - payload (UserRole): The payload containing the user email and organization ID.
3098
3108
  - workspace_id (str): The ID of the workspace.
3099
3109
  - request (Request): The FastAPI request object.
3100
3110
 
3101
3111
  Returns:
3102
-
3103
3112
  - WorkspaceResponse: The updated workspace.
3104
3113
 
3105
3114
  Raises:
3106
-
3107
3115
  - HTTPException: If the user does not have permission to perform this action.
3108
3116
  - HTTPException: If there is an error during the removal process.
3109
3117
 
@@ -34,13 +34,13 @@ class ContainersClient:
34
34
  Builds a Docker image from a tar file containing the application code.
35
35
 
36
36
  Args:
37
- app_id (str): The ID of the application to build the image for.
38
- base_name (str): The base name of the image to build.
39
- tar_file (UploadFile): The tar file containing the application code.
40
- stoken_session (SessionContainer): The session container for the user making the request.
37
+ app_id (str): The ID of the application to build the image for.
38
+ base_name (str): The base name of the image to build.
39
+ tar_file (UploadFile): The tar file containing the application code.
40
+ stoken_session (SessionContainer): The session container for the user making the request.
41
41
 
42
42
  Returns:
43
- Image: The Docker image that was built.
43
+ Image: The Docker image that was built.
44
44
 
45
45
  Parameters
46
46
  ----------
@@ -124,7 +124,7 @@ class ContainersClient:
124
124
  Restart docker container.
125
125
 
126
126
  Args:
127
- payload (RestartAppContainer) -- the required data (app_name and variant_name)
127
+ payload (RestartAppContainer) -- the required data (app_name and variant_name)
128
128
 
129
129
  Parameters
130
130
  ----------
@@ -159,7 +159,11 @@ class ContainersClient:
159
159
  headers={
160
160
  "content-type": "application/json",
161
161
  },
162
- request_options=request_options,
162
+ request_options=(
163
+ {**request_options, "timeout_in_seconds": 600}
164
+ if request_options
165
+ else {"timeout_in_seconds": 600}
166
+ ),
163
167
  omit=OMIT,
164
168
  )
165
169
  try:
@@ -222,7 +226,11 @@ class ContainersClient:
222
226
  _response = self._client_wrapper.httpx_client.request(
223
227
  "containers/templates",
224
228
  method="GET",
225
- request_options=request_options,
229
+ request_options=(
230
+ {**request_options, "timeout_in_seconds": 600}
231
+ if request_options
232
+ else {"timeout_in_seconds": 600}
233
+ ),
226
234
  )
227
235
  try:
228
236
  if 200 <= _response.status_code < 300:
@@ -249,15 +257,24 @@ class ContainersClient:
249
257
  Constructs the URL for an app container based on the provided base_id or variant_id.
250
258
 
251
259
  Args:
252
- base_id (Optional[str]): The ID of the base to use for the app container.
253
- variant_id (Optional[str]): The ID of the variant to use for the app container.
254
- request (Request): The request object.
260
+
261
+
262
+
263
+ base_id (Optional[str]): The ID of the base to use for the app container.
264
+ variant_id (Optional[str]): The ID of the variant to use for the app container.
265
+ request (Request): The request object.
255
266
 
256
267
  Returns:
257
- URI: The URI for the app container.
268
+
269
+
270
+
271
+ URI: The URI for the app container.
258
272
 
259
273
  Raises:
260
- HTTPException: If the base or variant cannot be found or the user does not have access.
274
+
275
+
276
+
277
+ HTTPException: If the base or variant cannot be found or the user does not have access.
261
278
 
262
279
  Parameters
263
280
  ----------
@@ -290,7 +307,11 @@ class ContainersClient:
290
307
  "base_id": base_id,
291
308
  "variant_id": variant_id,
292
309
  },
293
- request_options=request_options,
310
+ request_options=(
311
+ {**request_options, "timeout_in_seconds": 600}
312
+ if request_options
313
+ else {"timeout_in_seconds": 600}
314
+ ),
294
315
  )
295
316
  try:
296
317
  if 200 <= _response.status_code < 300:
@@ -333,13 +354,13 @@ class AsyncContainersClient:
333
354
  Builds a Docker image from a tar file containing the application code.
334
355
 
335
356
  Args:
336
- app_id (str): The ID of the application to build the image for.
337
- base_name (str): The base name of the image to build.
338
- tar_file (UploadFile): The tar file containing the application code.
339
- stoken_session (SessionContainer): The session container for the user making the request.
357
+ app_id (str): The ID of the application to build the image for.
358
+ base_name (str): The base name of the image to build.
359
+ tar_file (UploadFile): The tar file containing the application code.
360
+ stoken_session (SessionContainer): The session container for the user making the request.
340
361
 
341
362
  Returns:
342
- Image: The Docker image that was built.
363
+ Image: The Docker image that was built.
343
364
 
344
365
  Parameters
345
366
  ----------
@@ -431,7 +452,7 @@ class AsyncContainersClient:
431
452
  Restart docker container.
432
453
 
433
454
  Args:
434
- payload (RestartAppContainer) -- the required data (app_name and variant_name)
455
+ payload (RestartAppContainer) -- the required data (app_name and variant_name)
435
456
 
436
457
  Parameters
437
458
  ----------
@@ -474,7 +495,11 @@ class AsyncContainersClient:
474
495
  headers={
475
496
  "content-type": "application/json",
476
497
  },
477
- request_options=request_options,
498
+ request_options=(
499
+ {**request_options, "timeout_in_seconds": 600}
500
+ if request_options
501
+ else {"timeout_in_seconds": 600}
502
+ ),
478
503
  omit=OMIT,
479
504
  )
480
505
  try:
@@ -545,7 +570,11 @@ class AsyncContainersClient:
545
570
  _response = await self._client_wrapper.httpx_client.request(
546
571
  "containers/templates",
547
572
  method="GET",
548
- request_options=request_options,
573
+ request_options=(
574
+ {**request_options, "timeout_in_seconds": 600}
575
+ if request_options
576
+ else {"timeout_in_seconds": 600}
577
+ ),
549
578
  )
550
579
  try:
551
580
  if 200 <= _response.status_code < 300:
@@ -572,15 +601,24 @@ class AsyncContainersClient:
572
601
  Constructs the URL for an app container based on the provided base_id or variant_id.
573
602
 
574
603
  Args:
575
- base_id (Optional[str]): The ID of the base to use for the app container.
576
- variant_id (Optional[str]): The ID of the variant to use for the app container.
577
- request (Request): The request object.
604
+
605
+
606
+
607
+ base_id (Optional[str]): The ID of the base to use for the app container.
608
+ variant_id (Optional[str]): The ID of the variant to use for the app container.
609
+ request (Request): The request object.
578
610
 
579
611
  Returns:
580
- URI: The URI for the app container.
612
+
613
+
614
+
615
+ URI: The URI for the app container.
581
616
 
582
617
  Raises:
583
- HTTPException: If the base or variant cannot be found or the user does not have access.
618
+
619
+
620
+
621
+ HTTPException: If the base or variant cannot be found or the user does not have access.
584
622
 
585
623
  Parameters
586
624
  ----------
@@ -621,7 +659,11 @@ class AsyncContainersClient:
621
659
  "base_id": base_id,
622
660
  "variant_id": variant_id,
623
661
  },
624
- request_options=request_options,
662
+ request_options=(
663
+ {**request_options, "timeout_in_seconds": 600}
664
+ if request_options
665
+ else {"timeout_in_seconds": 600}
666
+ ),
625
667
  )
626
668
  try:
627
669
  if 200 <= _response.status_code < 300: