beamlit 0.0.24rc20__py3-none-any.whl → 0.0.25__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. beamlit/agents/chat.py +37 -11
  2. beamlit/agents/decorator.py +97 -65
  3. beamlit/api/agents/create_agent.py +9 -14
  4. beamlit/api/agents/delete_agent.py +22 -1
  5. beamlit/api/agents/delete_agent_history.py +2 -6
  6. beamlit/api/agents/get_agent.py +22 -1
  7. beamlit/api/agents/get_agent_environment_logs.py +11 -11
  8. beamlit/api/agents/get_agent_history.py +2 -6
  9. beamlit/api/agents/get_agent_metrics.py +22 -1
  10. beamlit/api/agents/list_agent_history.py +11 -11
  11. beamlit/api/agents/list_agents.py +36 -4
  12. beamlit/api/agents/put_agent_history.py +2 -6
  13. beamlit/api/agents/update_agent.py +9 -14
  14. beamlit/api/functions/create_function.py +9 -14
  15. beamlit/api/functions/delete_function.py +22 -1
  16. beamlit/api/functions/get_function.py +22 -1
  17. beamlit/api/functions/get_function_environment_logs.py +11 -11
  18. beamlit/api/functions/get_function_metrics.py +22 -1
  19. beamlit/api/functions/list_functions.py +36 -4
  20. beamlit/api/functions/update_function.py +9 -14
  21. beamlit/api/history/get_agents_history.py +12 -12
  22. beamlit/api/history/list_agents_history.py +12 -12
  23. beamlit/api/integrations/get_integration_connection.py +16 -12
  24. beamlit/api/integrations/get_integration_connection_model.py +8 -1
  25. beamlit/api/integrations/get_integration_model.py +8 -1
  26. beamlit/api/locations/list_locations.py +12 -12
  27. beamlit/api/models/create_model.py +13 -14
  28. beamlit/api/models/delete_model.py +22 -1
  29. beamlit/api/models/get_model.py +22 -1
  30. beamlit/api/models/get_model_environment_logs.py +11 -11
  31. beamlit/api/models/get_model_metrics.py +38 -13
  32. beamlit/api/models/list_models.py +36 -4
  33. beamlit/api/models/update_model.py +13 -14
  34. beamlit/api/privateclusters/__init__.py +0 -0
  35. beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
  36. beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
  37. beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
  38. beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
  39. beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
  40. beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
  41. beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
  42. beamlit/authentication/device_mode.py +3 -9
  43. beamlit/common/generate.py +47 -34
  44. beamlit/common/settings.py +29 -27
  45. beamlit/deploy/deploy.py +101 -342
  46. beamlit/deploy/format.py +70 -0
  47. beamlit/deploy/parser.py +175 -0
  48. beamlit/functions/decorator.py +8 -11
  49. beamlit/models/__init__.py +64 -78
  50. beamlit/models/acl.py +4 -22
  51. beamlit/models/agent.py +34 -95
  52. beamlit/models/agent_history.py +7 -5
  53. beamlit/models/agent_history_event.py +11 -9
  54. beamlit/models/agent_metadata.py +5 -3
  55. beamlit/models/agent_spec.py +54 -45
  56. beamlit/models/api_key.py +14 -14
  57. beamlit/models/configuration.py +11 -0
  58. beamlit/models/core_spec.py +45 -32
  59. beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
  60. beamlit/models/environment.py +33 -105
  61. beamlit/models/environment_metadata.py +146 -0
  62. beamlit/models/environment_spec.py +8 -6
  63. beamlit/models/function.py +34 -95
  64. beamlit/models/function_metadata.py +5 -3
  65. beamlit/models/function_spec.py +53 -40
  66. beamlit/models/integration_connection.py +31 -137
  67. beamlit/models/integration_connection_spec.py +6 -4
  68. beamlit/models/metadata.py +5 -3
  69. beamlit/models/metadata_labels.py +4 -2
  70. beamlit/models/model.py +33 -94
  71. beamlit/models/model_metadata.py +5 -3
  72. beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
  73. beamlit/models/model_provider.py +27 -43
  74. beamlit/models/model_spec.py +45 -32
  75. beamlit/models/owner_fields.py +4 -2
  76. beamlit/models/pending_invitation.py +14 -14
  77. beamlit/models/pod_template_spec.py +4 -2
  78. beamlit/models/policy.py +33 -159
  79. beamlit/models/policy_spec.py +24 -28
  80. beamlit/models/private_cluster.py +183 -0
  81. beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
  82. beamlit/models/resource_deployment_metrics.py +0 -108
  83. beamlit/models/resource_environment_metrics.py +143 -71
  84. beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
  85. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
  86. beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
  87. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
  88. beamlit/models/resource_log.py +4 -2
  89. beamlit/models/runtime.py +20 -2
  90. beamlit/models/serverless_config.py +28 -21
  91. beamlit/models/spec_configuration.py +7 -5
  92. beamlit/models/store_agent.py +14 -14
  93. beamlit/models/store_function.py +14 -14
  94. beamlit/models/time_fields.py +4 -2
  95. beamlit/models/websocket_channel.py +4 -2
  96. beamlit/models/workspace.py +23 -14
  97. beamlit/run.py +0 -1
  98. beamlit/serve/app.py +1 -0
  99. beamlit/serve/middlewares/accesslog.py +3 -1
  100. {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/METADATA +1 -1
  101. beamlit-0.0.25.dist-info/RECORD +243 -0
  102. beamlit/api/agents/delete_agent_deployment.py +0 -163
  103. beamlit/api/agents/delete_agent_deployment_history.py +0 -172
  104. beamlit/api/agents/get_agent_deployment_history.py +0 -172
  105. beamlit/api/agents/get_agent_deployment_logs.py +0 -164
  106. beamlit/api/agents/list_agent_deployment_history.py +0 -164
  107. beamlit/api/agents/put_agent_deployment.py +0 -185
  108. beamlit/api/agents/put_agent_deployment_history.py +0 -198
  109. beamlit/api/functions/delete_function_deployment.py +0 -163
  110. beamlit/api/functions/get_function_deployment.py +0 -163
  111. beamlit/api/functions/get_function_deployment_logs.py +0 -164
  112. beamlit/api/functions/get_function_deployment_metrics.py +0 -159
  113. beamlit/api/functions/put_function_deployment.py +0 -185
  114. beamlit/api/models/delete_model_deployment.py +0 -171
  115. beamlit/api/models/get_model_deployment.py +0 -171
  116. beamlit/api/models/get_model_deployment_logs.py +0 -168
  117. beamlit/api/models/get_model_deployment_metrics.py +0 -163
  118. beamlit/api/models/put_model_deployment.py +0 -193
  119. beamlit/models/agent_configuration.py +0 -70
  120. beamlit/models/agent_deployment.py +0 -340
  121. beamlit/models/agent_deployment_configuration.py +0 -45
  122. beamlit/models/agent_deployment_configuration_type_0.py +0 -43
  123. beamlit/models/agent_deployment_history.py +0 -185
  124. beamlit/models/agent_deployment_history_event.py +0 -133
  125. beamlit/models/agent_deployment_pod_template.py +0 -45
  126. beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
  127. beamlit/models/agent_with_deployments.py +0 -176
  128. beamlit/models/authentication_provider_model.py +0 -144
  129. beamlit/models/authentication_provider_organization.py +0 -88
  130. beamlit/models/deployment_configuration.py +0 -70
  131. beamlit/models/deployment_configurations.py +0 -58
  132. beamlit/models/deployment_serverless_config.py +0 -131
  133. beamlit/models/deployment_serverless_config_type_0.py +0 -220
  134. beamlit/models/function_configuration.py +0 -70
  135. beamlit/models/function_deployment.py +0 -340
  136. beamlit/models/function_deployment_configuration.py +0 -45
  137. beamlit/models/function_deployment_configuration_type_0.py +0 -43
  138. beamlit/models/function_deployment_pod_template.py +0 -45
  139. beamlit/models/function_deployment_pod_template_type_0.py +0 -43
  140. beamlit/models/function_with_deployments.py +0 -176
  141. beamlit/models/integration.py +0 -198
  142. beamlit/models/integration_config.py +0 -45
  143. beamlit/models/integration_secret.py +0 -61
  144. beamlit/models/labels_type_0.py +0 -45
  145. beamlit/models/location.py +0 -122
  146. beamlit/models/model_deployment.py +0 -296
  147. beamlit/models/model_deployment_log.py +0 -70
  148. beamlit/models/model_deployment_metrics.py +0 -172
  149. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
  150. beamlit/models/model_deployment_pod_template.py +0 -45
  151. beamlit/models/model_deployment_pod_template_type_0.py +0 -43
  152. beamlit/models/model_metrics.py +0 -96
  153. beamlit/models/model_with_deployments.py +0 -176
  154. beamlit/models/resource_deployment_log.py +0 -70
  155. beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
  156. beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
  157. beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
  158. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
  159. beamlit/models/runtime_readiness_probe_type_0.py +0 -43
  160. beamlit/models/runtime_type_0.py +0 -111
  161. beamlit/models/runtime_type_0_readiness_probe.py +0 -43
  162. beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
  163. beamlit/models/runtime_type_0_resources.py +0 -59
  164. beamlit/models/standard_fields_dynamo_db.py +0 -88
  165. beamlit/models/store_agent_configuration.py +0 -97
  166. beamlit/models/store_agent_labels_type_0.py +0 -43
  167. beamlit/models/store_function_configuration.py +0 -97
  168. beamlit/models/store_function_labels_type_0.py +0 -43
  169. beamlit-0.0.24rc20.dist-info/RECORD +0 -303
  170. {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/WHEEL +0 -0
@@ -6,15 +6,24 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.function import Function
9
- from ...types import Response
9
+ from ...types import UNSET, Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  function_name: str,
14
+ *,
15
+ environment: str,
14
16
  ) -> dict[str, Any]:
17
+ params: dict[str, Any] = {}
18
+
19
+ params["environment"] = environment
20
+
21
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
+
15
23
  _kwargs: dict[str, Any] = {
16
24
  "method": "delete",
17
25
  "url": f"/functions/{function_name}",
26
+ "params": params,
18
27
  }
19
28
 
20
29
  return _kwargs
@@ -44,11 +53,13 @@ def sync_detailed(
44
53
  function_name: str,
45
54
  *,
46
55
  client: AuthenticatedClient,
56
+ environment: str,
47
57
  ) -> Response[Function]:
48
58
  """Delete function by name
49
59
 
50
60
  Args:
51
61
  function_name (str):
62
+ environment (str):
52
63
 
53
64
  Raises:
54
65
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -60,6 +71,7 @@ def sync_detailed(
60
71
 
61
72
  kwargs = _get_kwargs(
62
73
  function_name=function_name,
74
+ environment=environment,
63
75
  )
64
76
 
65
77
  response = client.get_httpx_client().request(
@@ -73,11 +85,13 @@ def sync(
73
85
  function_name: str,
74
86
  *,
75
87
  client: AuthenticatedClient,
88
+ environment: str,
76
89
  ) -> Optional[Function]:
77
90
  """Delete function by name
78
91
 
79
92
  Args:
80
93
  function_name (str):
94
+ environment (str):
81
95
 
82
96
  Raises:
83
97
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -90,6 +104,7 @@ def sync(
90
104
  return sync_detailed(
91
105
  function_name=function_name,
92
106
  client=client,
107
+ environment=environment,
93
108
  ).parsed
94
109
 
95
110
 
@@ -97,11 +112,13 @@ async def asyncio_detailed(
97
112
  function_name: str,
98
113
  *,
99
114
  client: AuthenticatedClient,
115
+ environment: str,
100
116
  ) -> Response[Function]:
101
117
  """Delete function by name
102
118
 
103
119
  Args:
104
120
  function_name (str):
121
+ environment (str):
105
122
 
106
123
  Raises:
107
124
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -113,6 +130,7 @@ async def asyncio_detailed(
113
130
 
114
131
  kwargs = _get_kwargs(
115
132
  function_name=function_name,
133
+ environment=environment,
116
134
  )
117
135
 
118
136
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -124,11 +142,13 @@ async def asyncio(
124
142
  function_name: str,
125
143
  *,
126
144
  client: AuthenticatedClient,
145
+ environment: str,
127
146
  ) -> Optional[Function]:
128
147
  """Delete function by name
129
148
 
130
149
  Args:
131
150
  function_name (str):
151
+ environment (str):
132
152
 
133
153
  Raises:
134
154
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -142,5 +162,6 @@ async def asyncio(
142
162
  await asyncio_detailed(
143
163
  function_name=function_name,
144
164
  client=client,
165
+ environment=environment,
145
166
  )
146
167
  ).parsed
@@ -6,15 +6,24 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.function import Function
9
- from ...types import Response
9
+ from ...types import UNSET, Response, Unset
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  function_name: str,
14
+ *,
15
+ environment: Union[Unset, str] = UNSET,
14
16
  ) -> dict[str, Any]:
17
+ params: dict[str, Any] = {}
18
+
19
+ params["environment"] = environment
20
+
21
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
+
15
23
  _kwargs: dict[str, Any] = {
16
24
  "method": "get",
17
25
  "url": f"/functions/{function_name}",
26
+ "params": params,
18
27
  }
19
28
 
20
29
  return _kwargs
@@ -44,11 +53,13 @@ def sync_detailed(
44
53
  function_name: str,
45
54
  *,
46
55
  client: AuthenticatedClient,
56
+ environment: Union[Unset, str] = UNSET,
47
57
  ) -> Response[Function]:
48
58
  """Get function by name
49
59
 
50
60
  Args:
51
61
  function_name (str):
62
+ environment (Union[Unset, str]):
52
63
 
53
64
  Raises:
54
65
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -60,6 +71,7 @@ def sync_detailed(
60
71
 
61
72
  kwargs = _get_kwargs(
62
73
  function_name=function_name,
74
+ environment=environment,
63
75
  )
64
76
 
65
77
  response = client.get_httpx_client().request(
@@ -73,11 +85,13 @@ def sync(
73
85
  function_name: str,
74
86
  *,
75
87
  client: AuthenticatedClient,
88
+ environment: Union[Unset, str] = UNSET,
76
89
  ) -> Optional[Function]:
77
90
  """Get function by name
78
91
 
79
92
  Args:
80
93
  function_name (str):
94
+ environment (Union[Unset, str]):
81
95
 
82
96
  Raises:
83
97
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -90,6 +104,7 @@ def sync(
90
104
  return sync_detailed(
91
105
  function_name=function_name,
92
106
  client=client,
107
+ environment=environment,
93
108
  ).parsed
94
109
 
95
110
 
@@ -97,11 +112,13 @@ async def asyncio_detailed(
97
112
  function_name: str,
98
113
  *,
99
114
  client: AuthenticatedClient,
115
+ environment: Union[Unset, str] = UNSET,
100
116
  ) -> Response[Function]:
101
117
  """Get function by name
102
118
 
103
119
  Args:
104
120
  function_name (str):
121
+ environment (Union[Unset, str]):
105
122
 
106
123
  Raises:
107
124
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -113,6 +130,7 @@ async def asyncio_detailed(
113
130
 
114
131
  kwargs = _get_kwargs(
115
132
  function_name=function_name,
133
+ environment=environment,
116
134
  )
117
135
 
118
136
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -124,11 +142,13 @@ async def asyncio(
124
142
  function_name: str,
125
143
  *,
126
144
  client: AuthenticatedClient,
145
+ environment: Union[Unset, str] = UNSET,
127
146
  ) -> Optional[Function]:
128
147
  """Get function by name
129
148
 
130
149
  Args:
131
150
  function_name (str):
151
+ environment (Union[Unset, str]):
132
152
 
133
153
  Raises:
134
154
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -142,5 +162,6 @@ async def asyncio(
142
162
  await asyncio_detailed(
143
163
  function_name=function_name,
144
164
  client=client,
165
+ environment=environment,
145
166
  )
146
167
  ).parsed
@@ -1,5 +1,5 @@
1
1
  from http import HTTPStatus
2
- from typing import Any, List, Optional, Union
2
+ from typing import Any, Optional, Union
3
3
 
4
4
  import httpx
5
5
 
@@ -22,7 +22,7 @@ def _get_kwargs(
22
22
 
23
23
  def _parse_response(
24
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[List["ResourceLog"]]:
25
+ ) -> Optional[list["ResourceLog"]]:
26
26
  if response.status_code == 200:
27
27
  response_200 = []
28
28
  _response_200 = response.json()
@@ -40,7 +40,7 @@ def _parse_response(
40
40
 
41
41
  def _build_response(
42
42
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
- ) -> Response[List["ResourceLog"]]:
43
+ ) -> Response[list["ResourceLog"]]:
44
44
  return Response(
45
45
  status_code=HTTPStatus(response.status_code),
46
46
  content=response.content,
@@ -53,7 +53,7 @@ def sync_detailed(
53
53
  function_name: str,
54
54
  *,
55
55
  client: AuthenticatedClient,
56
- ) -> Response[List["ResourceLog"]]:
56
+ ) -> Response[list["ResourceLog"]]:
57
57
  """
58
58
  Args:
59
59
  function_name (str):
@@ -63,7 +63,7 @@ def sync_detailed(
63
63
  httpx.TimeoutException: If the request takes longer than Client.timeout.
64
64
 
65
65
  Returns:
66
- Response[List['ResourceLog']]
66
+ Response[list['ResourceLog']]
67
67
  """
68
68
 
69
69
  kwargs = _get_kwargs(
@@ -81,7 +81,7 @@ def sync(
81
81
  function_name: str,
82
82
  *,
83
83
  client: AuthenticatedClient,
84
- ) -> Optional[List["ResourceLog"]]:
84
+ ) -> Optional[list["ResourceLog"]]:
85
85
  """
86
86
  Args:
87
87
  function_name (str):
@@ -91,7 +91,7 @@ def sync(
91
91
  httpx.TimeoutException: If the request takes longer than Client.timeout.
92
92
 
93
93
  Returns:
94
- List['ResourceLog']
94
+ list['ResourceLog']
95
95
  """
96
96
 
97
97
  return sync_detailed(
@@ -104,7 +104,7 @@ async def asyncio_detailed(
104
104
  function_name: str,
105
105
  *,
106
106
  client: AuthenticatedClient,
107
- ) -> Response[List["ResourceLog"]]:
107
+ ) -> Response[list["ResourceLog"]]:
108
108
  """
109
109
  Args:
110
110
  function_name (str):
@@ -114,7 +114,7 @@ async def asyncio_detailed(
114
114
  httpx.TimeoutException: If the request takes longer than Client.timeout.
115
115
 
116
116
  Returns:
117
- Response[List['ResourceLog']]
117
+ Response[list['ResourceLog']]
118
118
  """
119
119
 
120
120
  kwargs = _get_kwargs(
@@ -130,7 +130,7 @@ async def asyncio(
130
130
  function_name: str,
131
131
  *,
132
132
  client: AuthenticatedClient,
133
- ) -> Optional[List["ResourceLog"]]:
133
+ ) -> Optional[list["ResourceLog"]]:
134
134
  """
135
135
  Args:
136
136
  function_name (str):
@@ -140,7 +140,7 @@ async def asyncio(
140
140
  httpx.TimeoutException: If the request takes longer than Client.timeout.
141
141
 
142
142
  Returns:
143
- List['ResourceLog']
143
+ list['ResourceLog']
144
144
  """
145
145
 
146
146
  return (
@@ -6,15 +6,24 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.resource_metrics import ResourceMetrics
9
- from ...types import Response
9
+ from ...types import UNSET, Response, Unset
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  function_name: str,
14
+ *,
15
+ environment: Union[Unset, str] = UNSET,
14
16
  ) -> dict[str, Any]:
17
+ params: dict[str, Any] = {}
18
+
19
+ params["environment"] = environment
20
+
21
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
+
15
23
  _kwargs: dict[str, Any] = {
16
24
  "method": "get",
17
25
  "url": f"/functions/{function_name}/metrics",
26
+ "params": params,
18
27
  }
19
28
 
20
29
  return _kwargs
@@ -48,11 +57,13 @@ def sync_detailed(
48
57
  function_name: str,
49
58
  *,
50
59
  client: AuthenticatedClient,
60
+ environment: Union[Unset, str] = UNSET,
51
61
  ) -> Response[ResourceMetrics]:
52
62
  """Get function metrics
53
63
 
54
64
  Args:
55
65
  function_name (str):
66
+ environment (Union[Unset, str]):
56
67
 
57
68
  Raises:
58
69
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -64,6 +75,7 @@ def sync_detailed(
64
75
 
65
76
  kwargs = _get_kwargs(
66
77
  function_name=function_name,
78
+ environment=environment,
67
79
  )
68
80
 
69
81
  response = client.get_httpx_client().request(
@@ -77,11 +89,13 @@ def sync(
77
89
  function_name: str,
78
90
  *,
79
91
  client: AuthenticatedClient,
92
+ environment: Union[Unset, str] = UNSET,
80
93
  ) -> Optional[ResourceMetrics]:
81
94
  """Get function metrics
82
95
 
83
96
  Args:
84
97
  function_name (str):
98
+ environment (Union[Unset, str]):
85
99
 
86
100
  Raises:
87
101
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -94,6 +108,7 @@ def sync(
94
108
  return sync_detailed(
95
109
  function_name=function_name,
96
110
  client=client,
111
+ environment=environment,
97
112
  ).parsed
98
113
 
99
114
 
@@ -101,11 +116,13 @@ async def asyncio_detailed(
101
116
  function_name: str,
102
117
  *,
103
118
  client: AuthenticatedClient,
119
+ environment: Union[Unset, str] = UNSET,
104
120
  ) -> Response[ResourceMetrics]:
105
121
  """Get function metrics
106
122
 
107
123
  Args:
108
124
  function_name (str):
125
+ environment (Union[Unset, str]):
109
126
 
110
127
  Raises:
111
128
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -117,6 +134,7 @@ async def asyncio_detailed(
117
134
 
118
135
  kwargs = _get_kwargs(
119
136
  function_name=function_name,
137
+ environment=environment,
120
138
  )
121
139
 
122
140
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -128,11 +146,13 @@ async def asyncio(
128
146
  function_name: str,
129
147
  *,
130
148
  client: AuthenticatedClient,
149
+ environment: Union[Unset, str] = UNSET,
131
150
  ) -> Optional[ResourceMetrics]:
132
151
  """Get function metrics
133
152
 
134
153
  Args:
135
154
  function_name (str):
155
+ environment (Union[Unset, str]):
136
156
 
137
157
  Raises:
138
158
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -146,5 +166,6 @@ async def asyncio(
146
166
  await asyncio_detailed(
147
167
  function_name=function_name,
148
168
  client=client,
169
+ environment=environment,
149
170
  )
150
171
  ).parsed
@@ -6,13 +6,23 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.function import Function
9
- from ...types import Response
9
+ from ...types import UNSET, Response, Unset
10
10
 
11
11
 
12
- def _get_kwargs() -> dict[str, Any]:
12
+ def _get_kwargs(
13
+ *,
14
+ environment: Union[Unset, str] = UNSET,
15
+ ) -> dict[str, Any]:
16
+ params: dict[str, Any] = {}
17
+
18
+ params["environment"] = environment
19
+
20
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
21
+
13
22
  _kwargs: dict[str, Any] = {
14
23
  "method": "get",
15
24
  "url": "/functions",
25
+ "params": params,
16
26
  }
17
27
 
18
28
  return _kwargs
@@ -50,9 +60,13 @@ def _build_response(
50
60
  def sync_detailed(
51
61
  *,
52
62
  client: AuthenticatedClient,
63
+ environment: Union[Unset, str] = UNSET,
53
64
  ) -> Response[list["Function"]]:
54
65
  """List all functions
55
66
 
67
+ Args:
68
+ environment (Union[Unset, str]):
69
+
56
70
  Raises:
57
71
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
58
72
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -61,7 +75,9 @@ def sync_detailed(
61
75
  Response[list['Function']]
62
76
  """
63
77
 
64
- kwargs = _get_kwargs()
78
+ kwargs = _get_kwargs(
79
+ environment=environment,
80
+ )
65
81
 
66
82
  response = client.get_httpx_client().request(
67
83
  **kwargs,
@@ -73,9 +89,13 @@ def sync_detailed(
73
89
  def sync(
74
90
  *,
75
91
  client: AuthenticatedClient,
92
+ environment: Union[Unset, str] = UNSET,
76
93
  ) -> Optional[list["Function"]]:
77
94
  """List all functions
78
95
 
96
+ Args:
97
+ environment (Union[Unset, str]):
98
+
79
99
  Raises:
80
100
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
81
101
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -86,15 +106,20 @@ def sync(
86
106
 
87
107
  return sync_detailed(
88
108
  client=client,
109
+ environment=environment,
89
110
  ).parsed
90
111
 
91
112
 
92
113
  async def asyncio_detailed(
93
114
  *,
94
115
  client: AuthenticatedClient,
116
+ environment: Union[Unset, str] = UNSET,
95
117
  ) -> Response[list["Function"]]:
96
118
  """List all functions
97
119
 
120
+ Args:
121
+ environment (Union[Unset, str]):
122
+
98
123
  Raises:
99
124
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
100
125
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -103,7 +128,9 @@ async def asyncio_detailed(
103
128
  Response[list['Function']]
104
129
  """
105
130
 
106
- kwargs = _get_kwargs()
131
+ kwargs = _get_kwargs(
132
+ environment=environment,
133
+ )
107
134
 
108
135
  response = await client.get_async_httpx_client().request(**kwargs)
109
136
 
@@ -113,9 +140,13 @@ async def asyncio_detailed(
113
140
  async def asyncio(
114
141
  *,
115
142
  client: AuthenticatedClient,
143
+ environment: Union[Unset, str] = UNSET,
116
144
  ) -> Optional[list["Function"]]:
117
145
  """List all functions
118
146
 
147
+ Args:
148
+ environment (Union[Unset, str]):
149
+
119
150
  Raises:
120
151
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
121
152
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -127,5 +158,6 @@ async def asyncio(
127
158
  return (
128
159
  await asyncio_detailed(
129
160
  client=client,
161
+ environment=environment,
130
162
  )
131
163
  ).parsed
@@ -6,14 +6,13 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.function import Function
9
- from ...models.function_with_deployments import FunctionWithDeployments
10
9
  from ...types import Response
11
10
 
12
11
 
13
12
  def _get_kwargs(
14
13
  function_name: str,
15
14
  *,
16
- body: FunctionWithDeployments,
15
+ body: Function,
17
16
  ) -> dict[str, Any]:
18
17
  headers: dict[str, Any] = {}
19
18
 
@@ -55,14 +54,13 @@ def sync_detailed(
55
54
  function_name: str,
56
55
  *,
57
56
  client: AuthenticatedClient,
58
- body: FunctionWithDeployments,
57
+ body: Function,
59
58
  ) -> Response[Function]:
60
59
  """Update function by name
61
60
 
62
61
  Args:
63
62
  function_name (str):
64
- body (FunctionWithDeployments): Logical object representing a function but with deployment
65
- definition inside
63
+ body (Function): Function
66
64
 
67
65
  Raises:
68
66
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -88,14 +86,13 @@ def sync(
88
86
  function_name: str,
89
87
  *,
90
88
  client: AuthenticatedClient,
91
- body: FunctionWithDeployments,
89
+ body: Function,
92
90
  ) -> Optional[Function]:
93
91
  """Update function by name
94
92
 
95
93
  Args:
96
94
  function_name (str):
97
- body (FunctionWithDeployments): Logical object representing a function but with deployment
98
- definition inside
95
+ body (Function): Function
99
96
 
100
97
  Raises:
101
98
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -116,14 +113,13 @@ async def asyncio_detailed(
116
113
  function_name: str,
117
114
  *,
118
115
  client: AuthenticatedClient,
119
- body: FunctionWithDeployments,
116
+ body: Function,
120
117
  ) -> Response[Function]:
121
118
  """Update function by name
122
119
 
123
120
  Args:
124
121
  function_name (str):
125
- body (FunctionWithDeployments): Logical object representing a function but with deployment
126
- definition inside
122
+ body (Function): Function
127
123
 
128
124
  Raises:
129
125
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -147,14 +143,13 @@ async def asyncio(
147
143
  function_name: str,
148
144
  *,
149
145
  client: AuthenticatedClient,
150
- body: FunctionWithDeployments,
146
+ body: Function,
151
147
  ) -> Optional[Function]:
152
148
  """Update function by name
153
149
 
154
150
  Args:
155
151
  function_name (str):
156
- body (FunctionWithDeployments): Logical object representing a function but with deployment
157
- definition inside
152
+ body (Function): Function
158
153
 
159
154
  Raises:
160
155
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.