arize 8.0.0a22__py3-none-any.whl → 8.0.0a23__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.
Files changed (166) hide show
  1. arize/__init__.py +17 -9
  2. arize/_exporter/client.py +55 -36
  3. arize/_exporter/parsers/tracing_data_parser.py +41 -30
  4. arize/_exporter/validation.py +3 -3
  5. arize/_flight/client.py +207 -76
  6. arize/_generated/api_client/__init__.py +30 -6
  7. arize/_generated/api_client/api/__init__.py +1 -0
  8. arize/_generated/api_client/api/datasets_api.py +864 -190
  9. arize/_generated/api_client/api/experiments_api.py +167 -131
  10. arize/_generated/api_client/api/projects_api.py +1197 -0
  11. arize/_generated/api_client/api_client.py +2 -2
  12. arize/_generated/api_client/configuration.py +42 -34
  13. arize/_generated/api_client/exceptions.py +2 -2
  14. arize/_generated/api_client/models/__init__.py +15 -4
  15. arize/_generated/api_client/models/dataset.py +10 -10
  16. arize/_generated/api_client/models/dataset_example.py +111 -0
  17. arize/_generated/api_client/models/dataset_example_update.py +100 -0
  18. arize/_generated/api_client/models/dataset_version.py +13 -13
  19. arize/_generated/api_client/models/datasets_create_request.py +16 -8
  20. arize/_generated/api_client/models/datasets_examples_insert_request.py +100 -0
  21. arize/_generated/api_client/models/datasets_examples_list200_response.py +106 -0
  22. arize/_generated/api_client/models/datasets_examples_update_request.py +102 -0
  23. arize/_generated/api_client/models/datasets_list200_response.py +10 -4
  24. arize/_generated/api_client/models/experiment.py +14 -16
  25. arize/_generated/api_client/models/experiment_run.py +108 -0
  26. arize/_generated/api_client/models/experiment_run_create.py +102 -0
  27. arize/_generated/api_client/models/experiments_create_request.py +16 -10
  28. arize/_generated/api_client/models/experiments_list200_response.py +10 -4
  29. arize/_generated/api_client/models/experiments_runs_list200_response.py +19 -5
  30. arize/_generated/api_client/models/{error.py → pagination_metadata.py} +13 -11
  31. arize/_generated/api_client/models/primitive_value.py +172 -0
  32. arize/_generated/api_client/models/problem.py +100 -0
  33. arize/_generated/api_client/models/project.py +99 -0
  34. arize/_generated/api_client/models/{datasets_list_examples200_response.py → projects_create_request.py} +13 -11
  35. arize/_generated/api_client/models/projects_list200_response.py +106 -0
  36. arize/_generated/api_client/rest.py +2 -2
  37. arize/_generated/api_client/test/test_dataset.py +4 -2
  38. arize/_generated/api_client/test/test_dataset_example.py +56 -0
  39. arize/_generated/api_client/test/test_dataset_example_update.py +52 -0
  40. arize/_generated/api_client/test/test_dataset_version.py +7 -2
  41. arize/_generated/api_client/test/test_datasets_api.py +27 -13
  42. arize/_generated/api_client/test/test_datasets_create_request.py +8 -4
  43. arize/_generated/api_client/test/{test_datasets_list_examples200_response.py → test_datasets_examples_insert_request.py} +19 -15
  44. arize/_generated/api_client/test/test_datasets_examples_list200_response.py +66 -0
  45. arize/_generated/api_client/test/test_datasets_examples_update_request.py +61 -0
  46. arize/_generated/api_client/test/test_datasets_list200_response.py +9 -3
  47. arize/_generated/api_client/test/test_experiment.py +2 -4
  48. arize/_generated/api_client/test/test_experiment_run.py +56 -0
  49. arize/_generated/api_client/test/test_experiment_run_create.py +54 -0
  50. arize/_generated/api_client/test/test_experiments_api.py +6 -6
  51. arize/_generated/api_client/test/test_experiments_create_request.py +9 -6
  52. arize/_generated/api_client/test/test_experiments_list200_response.py +9 -5
  53. arize/_generated/api_client/test/test_experiments_runs_list200_response.py +15 -5
  54. arize/_generated/api_client/test/test_pagination_metadata.py +53 -0
  55. arize/_generated/api_client/test/{test_error.py → test_primitive_value.py} +13 -14
  56. arize/_generated/api_client/test/test_problem.py +57 -0
  57. arize/_generated/api_client/test/test_project.py +58 -0
  58. arize/_generated/api_client/test/test_projects_api.py +59 -0
  59. arize/_generated/api_client/test/test_projects_create_request.py +54 -0
  60. arize/_generated/api_client/test/test_projects_list200_response.py +70 -0
  61. arize/_generated/api_client_README.md +43 -29
  62. arize/_generated/protocol/flight/flight_pb2.py +400 -0
  63. arize/_lazy.py +27 -19
  64. arize/client.py +268 -55
  65. arize/config.py +365 -116
  66. arize/constants/__init__.py +1 -0
  67. arize/constants/config.py +11 -4
  68. arize/constants/ml.py +6 -4
  69. arize/constants/openinference.py +2 -0
  70. arize/constants/pyarrow.py +2 -0
  71. arize/constants/spans.py +3 -1
  72. arize/datasets/__init__.py +1 -0
  73. arize/datasets/client.py +299 -84
  74. arize/datasets/errors.py +32 -2
  75. arize/datasets/validation.py +18 -8
  76. arize/embeddings/__init__.py +2 -0
  77. arize/embeddings/auto_generator.py +23 -19
  78. arize/embeddings/base_generators.py +89 -36
  79. arize/embeddings/constants.py +2 -0
  80. arize/embeddings/cv_generators.py +26 -4
  81. arize/embeddings/errors.py +27 -5
  82. arize/embeddings/nlp_generators.py +31 -12
  83. arize/embeddings/tabular_generators.py +32 -20
  84. arize/embeddings/usecases.py +12 -2
  85. arize/exceptions/__init__.py +1 -0
  86. arize/exceptions/auth.py +11 -1
  87. arize/exceptions/base.py +29 -4
  88. arize/exceptions/models.py +21 -2
  89. arize/exceptions/parameters.py +31 -0
  90. arize/exceptions/spaces.py +12 -1
  91. arize/exceptions/types.py +86 -7
  92. arize/exceptions/values.py +220 -20
  93. arize/experiments/__init__.py +1 -0
  94. arize/experiments/client.py +389 -285
  95. arize/experiments/evaluators/__init__.py +1 -0
  96. arize/experiments/evaluators/base.py +74 -41
  97. arize/experiments/evaluators/exceptions.py +6 -3
  98. arize/experiments/evaluators/executors.py +121 -73
  99. arize/experiments/evaluators/rate_limiters.py +106 -57
  100. arize/experiments/evaluators/types.py +34 -7
  101. arize/experiments/evaluators/utils.py +65 -27
  102. arize/experiments/functions.py +103 -101
  103. arize/experiments/tracing.py +52 -44
  104. arize/experiments/types.py +56 -31
  105. arize/logging.py +54 -22
  106. arize/models/__init__.py +1 -0
  107. arize/models/batch_validation/__init__.py +1 -0
  108. arize/models/batch_validation/errors.py +543 -65
  109. arize/models/batch_validation/validator.py +339 -300
  110. arize/models/bounded_executor.py +20 -7
  111. arize/models/casting.py +75 -29
  112. arize/models/client.py +326 -107
  113. arize/models/proto.py +95 -40
  114. arize/models/stream_validation.py +42 -14
  115. arize/models/surrogate_explainer/__init__.py +1 -0
  116. arize/models/surrogate_explainer/mimic.py +24 -13
  117. arize/pre_releases.py +43 -0
  118. arize/projects/__init__.py +1 -0
  119. arize/projects/client.py +129 -0
  120. arize/regions.py +40 -0
  121. arize/spans/__init__.py +1 -0
  122. arize/spans/client.py +130 -106
  123. arize/spans/columns.py +13 -0
  124. arize/spans/conversion.py +54 -38
  125. arize/spans/validation/__init__.py +1 -0
  126. arize/spans/validation/annotations/__init__.py +1 -0
  127. arize/spans/validation/annotations/annotations_validation.py +6 -4
  128. arize/spans/validation/annotations/dataframe_form_validation.py +13 -11
  129. arize/spans/validation/annotations/value_validation.py +35 -11
  130. arize/spans/validation/common/__init__.py +1 -0
  131. arize/spans/validation/common/argument_validation.py +33 -8
  132. arize/spans/validation/common/dataframe_form_validation.py +35 -9
  133. arize/spans/validation/common/errors.py +211 -11
  134. arize/spans/validation/common/value_validation.py +80 -13
  135. arize/spans/validation/evals/__init__.py +1 -0
  136. arize/spans/validation/evals/dataframe_form_validation.py +28 -8
  137. arize/spans/validation/evals/evals_validation.py +34 -4
  138. arize/spans/validation/evals/value_validation.py +26 -3
  139. arize/spans/validation/metadata/__init__.py +1 -1
  140. arize/spans/validation/metadata/argument_validation.py +14 -5
  141. arize/spans/validation/metadata/dataframe_form_validation.py +26 -10
  142. arize/spans/validation/metadata/value_validation.py +24 -10
  143. arize/spans/validation/spans/__init__.py +1 -0
  144. arize/spans/validation/spans/dataframe_form_validation.py +34 -13
  145. arize/spans/validation/spans/spans_validation.py +35 -4
  146. arize/spans/validation/spans/value_validation.py +76 -7
  147. arize/types.py +293 -157
  148. arize/utils/__init__.py +1 -0
  149. arize/utils/arrow.py +31 -15
  150. arize/utils/cache.py +34 -6
  151. arize/utils/dataframe.py +19 -2
  152. arize/utils/online_tasks/__init__.py +2 -0
  153. arize/utils/online_tasks/dataframe_preprocessor.py +53 -41
  154. arize/utils/openinference_conversion.py +44 -5
  155. arize/utils/proto.py +10 -0
  156. arize/utils/size.py +5 -3
  157. arize/version.py +3 -1
  158. {arize-8.0.0a22.dist-info → arize-8.0.0a23.dist-info}/METADATA +4 -3
  159. arize-8.0.0a23.dist-info/RECORD +174 -0
  160. {arize-8.0.0a22.dist-info → arize-8.0.0a23.dist-info}/WHEEL +1 -1
  161. arize-8.0.0a23.dist-info/licenses/LICENSE +176 -0
  162. arize-8.0.0a23.dist-info/licenses/NOTICE +13 -0
  163. arize/_generated/protocol/flight/export_pb2.py +0 -61
  164. arize/_generated/protocol/flight/ingest_pb2.py +0 -365
  165. arize-8.0.0a22.dist-info/RECORD +0 -146
  166. arize-8.0.0a22.dist-info/licenses/LICENSE.md +0 -12
@@ -0,0 +1,1197 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from arize._generated.api_client.models.project import Project
23
+ from arize._generated.api_client.models.projects_create_request import ProjectsCreateRequest
24
+ from arize._generated.api_client.models.projects_list200_response import ProjectsList200Response
25
+
26
+ from arize._generated.api_client.api_client import ApiClient, RequestSerialized
27
+ from arize._generated.api_client.api_response import ApiResponse
28
+ from arize._generated.api_client.rest import RESTResponseType
29
+
30
+
31
+ class ProjectsApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def projects_create(
46
+ self,
47
+ projects_create_request: Annotated[ProjectsCreateRequest, Field(description="Body containing project creation parameters")],
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> Project:
61
+ """Create a project
62
+
63
+ Create a new project given a name and space ID. **Payload Requirements** - The project name must be unique within the given space. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
64
+
65
+ :param projects_create_request: Body containing project creation parameters (required)
66
+ :type projects_create_request: ProjectsCreateRequest
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._projects_create_serialize(
90
+ projects_create_request=projects_create_request,
91
+ _request_auth=_request_auth,
92
+ _content_type=_content_type,
93
+ _headers=_headers,
94
+ _host_index=_host_index
95
+ )
96
+
97
+ _response_types_map: Dict[str, Optional[str]] = {
98
+ '201': "Project",
99
+ '400': "Problem",
100
+ '401': "Problem",
101
+ '403': "Problem",
102
+ '409': "Problem",
103
+ '429': "Problem",
104
+ }
105
+ response_data = self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ def projects_create_with_http_info(
118
+ self,
119
+ projects_create_request: Annotated[ProjectsCreateRequest, Field(description="Body containing project creation parameters")],
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[Project]:
133
+ """Create a project
134
+
135
+ Create a new project given a name and space ID. **Payload Requirements** - The project name must be unique within the given space. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
136
+
137
+ :param projects_create_request: Body containing project creation parameters (required)
138
+ :type projects_create_request: ProjectsCreateRequest
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._projects_create_serialize(
162
+ projects_create_request=projects_create_request,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '201': "Project",
171
+ '400': "Problem",
172
+ '401': "Problem",
173
+ '403': "Problem",
174
+ '409': "Problem",
175
+ '429': "Problem",
176
+ }
177
+ response_data = self.api_client.call_api(
178
+ *_param,
179
+ _request_timeout=_request_timeout
180
+ )
181
+ response_data.read()
182
+ return self.api_client.response_deserialize(
183
+ response_data=response_data,
184
+ response_types_map=_response_types_map,
185
+ )
186
+
187
+
188
+ @validate_call
189
+ def projects_create_without_preload_content(
190
+ self,
191
+ projects_create_request: Annotated[ProjectsCreateRequest, Field(description="Body containing project creation parameters")],
192
+ _request_timeout: Union[
193
+ None,
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Tuple[
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Annotated[StrictFloat, Field(gt=0)]
198
+ ]
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """Create a project
206
+
207
+ Create a new project given a name and space ID. **Payload Requirements** - The project name must be unique within the given space. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
208
+
209
+ :param projects_create_request: Body containing project creation parameters (required)
210
+ :type projects_create_request: ProjectsCreateRequest
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._projects_create_serialize(
234
+ projects_create_request=projects_create_request,
235
+ _request_auth=_request_auth,
236
+ _content_type=_content_type,
237
+ _headers=_headers,
238
+ _host_index=_host_index
239
+ )
240
+
241
+ _response_types_map: Dict[str, Optional[str]] = {
242
+ '201': "Project",
243
+ '400': "Problem",
244
+ '401': "Problem",
245
+ '403': "Problem",
246
+ '409': "Problem",
247
+ '429': "Problem",
248
+ }
249
+ response_data = self.api_client.call_api(
250
+ *_param,
251
+ _request_timeout=_request_timeout
252
+ )
253
+ return response_data.response
254
+
255
+
256
+ def _projects_create_serialize(
257
+ self,
258
+ projects_create_request,
259
+ _request_auth,
260
+ _content_type,
261
+ _headers,
262
+ _host_index,
263
+ ) -> RequestSerialized:
264
+
265
+ _host = None
266
+
267
+ _collection_formats: Dict[str, str] = {
268
+ }
269
+
270
+ _path_params: Dict[str, str] = {}
271
+ _query_params: List[Tuple[str, str]] = []
272
+ _header_params: Dict[str, Optional[str]] = _headers or {}
273
+ _form_params: List[Tuple[str, str]] = []
274
+ _files: Dict[
275
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
276
+ ] = {}
277
+ _body_params: Optional[bytes] = None
278
+
279
+ # process the path parameters
280
+ # process the query parameters
281
+ # process the header parameters
282
+ # process the form parameters
283
+ # process the body parameter
284
+ if projects_create_request is not None:
285
+ _body_params = projects_create_request
286
+
287
+
288
+ # set the HTTP header `Accept`
289
+ if 'Accept' not in _header_params:
290
+ _header_params['Accept'] = self.api_client.select_header_accept(
291
+ [
292
+ 'application/json',
293
+ 'application/problem+json'
294
+ ]
295
+ )
296
+
297
+ # set the HTTP header `Content-Type`
298
+ if _content_type:
299
+ _header_params['Content-Type'] = _content_type
300
+ else:
301
+ _default_content_type = (
302
+ self.api_client.select_header_content_type(
303
+ [
304
+ 'application/json'
305
+ ]
306
+ )
307
+ )
308
+ if _default_content_type is not None:
309
+ _header_params['Content-Type'] = _default_content_type
310
+
311
+ # authentication setting
312
+ _auth_settings: List[str] = [
313
+ 'bearerAuth'
314
+ ]
315
+
316
+ return self.api_client.param_serialize(
317
+ method='POST',
318
+ resource_path='/v2/projects',
319
+ path_params=_path_params,
320
+ query_params=_query_params,
321
+ header_params=_header_params,
322
+ body=_body_params,
323
+ post_params=_form_params,
324
+ files=_files,
325
+ auth_settings=_auth_settings,
326
+ collection_formats=_collection_formats,
327
+ _host=_host,
328
+ _request_auth=_request_auth
329
+ )
330
+
331
+
332
+
333
+
334
+ @validate_call
335
+ def projects_delete(
336
+ self,
337
+ project_id: Annotated[StrictStr, Field(description="The unique identifier of the project")],
338
+ _request_timeout: Union[
339
+ None,
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Tuple[
342
+ Annotated[StrictFloat, Field(gt=0)],
343
+ Annotated[StrictFloat, Field(gt=0)]
344
+ ]
345
+ ] = None,
346
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
347
+ _content_type: Optional[StrictStr] = None,
348
+ _headers: Optional[Dict[StrictStr, Any]] = None,
349
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
350
+ ) -> None:
351
+ """Delete a project
352
+
353
+ Delete a project by its ID. This operation is irreversible. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
354
+
355
+ :param project_id: The unique identifier of the project (required)
356
+ :type project_id: str
357
+ :param _request_timeout: timeout setting for this request. If one
358
+ number provided, it will be total request
359
+ timeout. It can also be a pair (tuple) of
360
+ (connection, read) timeouts.
361
+ :type _request_timeout: int, tuple(int, int), optional
362
+ :param _request_auth: set to override the auth_settings for an a single
363
+ request; this effectively ignores the
364
+ authentication in the spec for a single request.
365
+ :type _request_auth: dict, optional
366
+ :param _content_type: force content-type for the request.
367
+ :type _content_type: str, Optional
368
+ :param _headers: set to override the headers for a single
369
+ request; this effectively ignores the headers
370
+ in the spec for a single request.
371
+ :type _headers: dict, optional
372
+ :param _host_index: set to override the host_index for a single
373
+ request; this effectively ignores the host_index
374
+ in the spec for a single request.
375
+ :type _host_index: int, optional
376
+ :return: Returns the result object.
377
+ """ # noqa: E501
378
+
379
+ _param = self._projects_delete_serialize(
380
+ project_id=project_id,
381
+ _request_auth=_request_auth,
382
+ _content_type=_content_type,
383
+ _headers=_headers,
384
+ _host_index=_host_index
385
+ )
386
+
387
+ _response_types_map: Dict[str, Optional[str]] = {
388
+ '204': None,
389
+ '400': "Problem",
390
+ '401': "Problem",
391
+ '403': "Problem",
392
+ '404': "Problem",
393
+ '422': "Problem",
394
+ '429': "Problem",
395
+ }
396
+ response_data = self.api_client.call_api(
397
+ *_param,
398
+ _request_timeout=_request_timeout
399
+ )
400
+ response_data.read()
401
+ return self.api_client.response_deserialize(
402
+ response_data=response_data,
403
+ response_types_map=_response_types_map,
404
+ ).data
405
+
406
+
407
+ @validate_call
408
+ def projects_delete_with_http_info(
409
+ self,
410
+ project_id: Annotated[StrictStr, Field(description="The unique identifier of the project")],
411
+ _request_timeout: Union[
412
+ None,
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Tuple[
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Annotated[StrictFloat, Field(gt=0)]
417
+ ]
418
+ ] = None,
419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
420
+ _content_type: Optional[StrictStr] = None,
421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
423
+ ) -> ApiResponse[None]:
424
+ """Delete a project
425
+
426
+ Delete a project by its ID. This operation is irreversible. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
427
+
428
+ :param project_id: The unique identifier of the project (required)
429
+ :type project_id: str
430
+ :param _request_timeout: timeout setting for this request. If one
431
+ number provided, it will be total request
432
+ timeout. It can also be a pair (tuple) of
433
+ (connection, read) timeouts.
434
+ :type _request_timeout: int, tuple(int, int), optional
435
+ :param _request_auth: set to override the auth_settings for an a single
436
+ request; this effectively ignores the
437
+ authentication in the spec for a single request.
438
+ :type _request_auth: dict, optional
439
+ :param _content_type: force content-type for the request.
440
+ :type _content_type: str, Optional
441
+ :param _headers: set to override the headers for a single
442
+ request; this effectively ignores the headers
443
+ in the spec for a single request.
444
+ :type _headers: dict, optional
445
+ :param _host_index: set to override the host_index for a single
446
+ request; this effectively ignores the host_index
447
+ in the spec for a single request.
448
+ :type _host_index: int, optional
449
+ :return: Returns the result object.
450
+ """ # noqa: E501
451
+
452
+ _param = self._projects_delete_serialize(
453
+ project_id=project_id,
454
+ _request_auth=_request_auth,
455
+ _content_type=_content_type,
456
+ _headers=_headers,
457
+ _host_index=_host_index
458
+ )
459
+
460
+ _response_types_map: Dict[str, Optional[str]] = {
461
+ '204': None,
462
+ '400': "Problem",
463
+ '401': "Problem",
464
+ '403': "Problem",
465
+ '404': "Problem",
466
+ '422': "Problem",
467
+ '429': "Problem",
468
+ }
469
+ response_data = self.api_client.call_api(
470
+ *_param,
471
+ _request_timeout=_request_timeout
472
+ )
473
+ response_data.read()
474
+ return self.api_client.response_deserialize(
475
+ response_data=response_data,
476
+ response_types_map=_response_types_map,
477
+ )
478
+
479
+
480
+ @validate_call
481
+ def projects_delete_without_preload_content(
482
+ self,
483
+ project_id: Annotated[StrictStr, Field(description="The unique identifier of the project")],
484
+ _request_timeout: Union[
485
+ None,
486
+ Annotated[StrictFloat, Field(gt=0)],
487
+ Tuple[
488
+ Annotated[StrictFloat, Field(gt=0)],
489
+ Annotated[StrictFloat, Field(gt=0)]
490
+ ]
491
+ ] = None,
492
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
493
+ _content_type: Optional[StrictStr] = None,
494
+ _headers: Optional[Dict[StrictStr, Any]] = None,
495
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
496
+ ) -> RESTResponseType:
497
+ """Delete a project
498
+
499
+ Delete a project by its ID. This operation is irreversible. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
500
+
501
+ :param project_id: The unique identifier of the project (required)
502
+ :type project_id: str
503
+ :param _request_timeout: timeout setting for this request. If one
504
+ number provided, it will be total request
505
+ timeout. It can also be a pair (tuple) of
506
+ (connection, read) timeouts.
507
+ :type _request_timeout: int, tuple(int, int), optional
508
+ :param _request_auth: set to override the auth_settings for an a single
509
+ request; this effectively ignores the
510
+ authentication in the spec for a single request.
511
+ :type _request_auth: dict, optional
512
+ :param _content_type: force content-type for the request.
513
+ :type _content_type: str, Optional
514
+ :param _headers: set to override the headers for a single
515
+ request; this effectively ignores the headers
516
+ in the spec for a single request.
517
+ :type _headers: dict, optional
518
+ :param _host_index: set to override the host_index for a single
519
+ request; this effectively ignores the host_index
520
+ in the spec for a single request.
521
+ :type _host_index: int, optional
522
+ :return: Returns the result object.
523
+ """ # noqa: E501
524
+
525
+ _param = self._projects_delete_serialize(
526
+ project_id=project_id,
527
+ _request_auth=_request_auth,
528
+ _content_type=_content_type,
529
+ _headers=_headers,
530
+ _host_index=_host_index
531
+ )
532
+
533
+ _response_types_map: Dict[str, Optional[str]] = {
534
+ '204': None,
535
+ '400': "Problem",
536
+ '401': "Problem",
537
+ '403': "Problem",
538
+ '404': "Problem",
539
+ '422': "Problem",
540
+ '429': "Problem",
541
+ }
542
+ response_data = self.api_client.call_api(
543
+ *_param,
544
+ _request_timeout=_request_timeout
545
+ )
546
+ return response_data.response
547
+
548
+
549
+ def _projects_delete_serialize(
550
+ self,
551
+ project_id,
552
+ _request_auth,
553
+ _content_type,
554
+ _headers,
555
+ _host_index,
556
+ ) -> RequestSerialized:
557
+
558
+ _host = None
559
+
560
+ _collection_formats: Dict[str, str] = {
561
+ }
562
+
563
+ _path_params: Dict[str, str] = {}
564
+ _query_params: List[Tuple[str, str]] = []
565
+ _header_params: Dict[str, Optional[str]] = _headers or {}
566
+ _form_params: List[Tuple[str, str]] = []
567
+ _files: Dict[
568
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
569
+ ] = {}
570
+ _body_params: Optional[bytes] = None
571
+
572
+ # process the path parameters
573
+ if project_id is not None:
574
+ _path_params['project_id'] = project_id
575
+ # process the query parameters
576
+ # process the header parameters
577
+ # process the form parameters
578
+ # process the body parameter
579
+
580
+
581
+ # set the HTTP header `Accept`
582
+ if 'Accept' not in _header_params:
583
+ _header_params['Accept'] = self.api_client.select_header_accept(
584
+ [
585
+ 'application/problem+json'
586
+ ]
587
+ )
588
+
589
+
590
+ # authentication setting
591
+ _auth_settings: List[str] = [
592
+ 'bearerAuth'
593
+ ]
594
+
595
+ return self.api_client.param_serialize(
596
+ method='DELETE',
597
+ resource_path='/v2/projects/{project_id}',
598
+ path_params=_path_params,
599
+ query_params=_query_params,
600
+ header_params=_header_params,
601
+ body=_body_params,
602
+ post_params=_form_params,
603
+ files=_files,
604
+ auth_settings=_auth_settings,
605
+ collection_formats=_collection_formats,
606
+ _host=_host,
607
+ _request_auth=_request_auth
608
+ )
609
+
610
+
611
+
612
+
613
+ @validate_call
614
+ def projects_get(
615
+ self,
616
+ project_id: Annotated[StrictStr, Field(description="The unique identifier of the project")],
617
+ _request_timeout: Union[
618
+ None,
619
+ Annotated[StrictFloat, Field(gt=0)],
620
+ Tuple[
621
+ Annotated[StrictFloat, Field(gt=0)],
622
+ Annotated[StrictFloat, Field(gt=0)]
623
+ ]
624
+ ] = None,
625
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
626
+ _content_type: Optional[StrictStr] = None,
627
+ _headers: Optional[Dict[StrictStr, Any]] = None,
628
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
629
+ ) -> Project:
630
+ """Get a project
631
+
632
+ Get a specific project by its ID. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
633
+
634
+ :param project_id: The unique identifier of the project (required)
635
+ :type project_id: str
636
+ :param _request_timeout: timeout setting for this request. If one
637
+ number provided, it will be total request
638
+ timeout. It can also be a pair (tuple) of
639
+ (connection, read) timeouts.
640
+ :type _request_timeout: int, tuple(int, int), optional
641
+ :param _request_auth: set to override the auth_settings for an a single
642
+ request; this effectively ignores the
643
+ authentication in the spec for a single request.
644
+ :type _request_auth: dict, optional
645
+ :param _content_type: force content-type for the request.
646
+ :type _content_type: str, Optional
647
+ :param _headers: set to override the headers for a single
648
+ request; this effectively ignores the headers
649
+ in the spec for a single request.
650
+ :type _headers: dict, optional
651
+ :param _host_index: set to override the host_index for a single
652
+ request; this effectively ignores the host_index
653
+ in the spec for a single request.
654
+ :type _host_index: int, optional
655
+ :return: Returns the result object.
656
+ """ # noqa: E501
657
+
658
+ _param = self._projects_get_serialize(
659
+ project_id=project_id,
660
+ _request_auth=_request_auth,
661
+ _content_type=_content_type,
662
+ _headers=_headers,
663
+ _host_index=_host_index
664
+ )
665
+
666
+ _response_types_map: Dict[str, Optional[str]] = {
667
+ '200': "Project",
668
+ '400': "Problem",
669
+ '401': "Problem",
670
+ '403': "Problem",
671
+ '404': "Problem",
672
+ '429': "Problem",
673
+ }
674
+ response_data = self.api_client.call_api(
675
+ *_param,
676
+ _request_timeout=_request_timeout
677
+ )
678
+ response_data.read()
679
+ return self.api_client.response_deserialize(
680
+ response_data=response_data,
681
+ response_types_map=_response_types_map,
682
+ ).data
683
+
684
+
685
+ @validate_call
686
+ def projects_get_with_http_info(
687
+ self,
688
+ project_id: Annotated[StrictStr, Field(description="The unique identifier of the project")],
689
+ _request_timeout: Union[
690
+ None,
691
+ Annotated[StrictFloat, Field(gt=0)],
692
+ Tuple[
693
+ Annotated[StrictFloat, Field(gt=0)],
694
+ Annotated[StrictFloat, Field(gt=0)]
695
+ ]
696
+ ] = None,
697
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
698
+ _content_type: Optional[StrictStr] = None,
699
+ _headers: Optional[Dict[StrictStr, Any]] = None,
700
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
701
+ ) -> ApiResponse[Project]:
702
+ """Get a project
703
+
704
+ Get a specific project by its ID. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
705
+
706
+ :param project_id: The unique identifier of the project (required)
707
+ :type project_id: str
708
+ :param _request_timeout: timeout setting for this request. If one
709
+ number provided, it will be total request
710
+ timeout. It can also be a pair (tuple) of
711
+ (connection, read) timeouts.
712
+ :type _request_timeout: int, tuple(int, int), optional
713
+ :param _request_auth: set to override the auth_settings for an a single
714
+ request; this effectively ignores the
715
+ authentication in the spec for a single request.
716
+ :type _request_auth: dict, optional
717
+ :param _content_type: force content-type for the request.
718
+ :type _content_type: str, Optional
719
+ :param _headers: set to override the headers for a single
720
+ request; this effectively ignores the headers
721
+ in the spec for a single request.
722
+ :type _headers: dict, optional
723
+ :param _host_index: set to override the host_index for a single
724
+ request; this effectively ignores the host_index
725
+ in the spec for a single request.
726
+ :type _host_index: int, optional
727
+ :return: Returns the result object.
728
+ """ # noqa: E501
729
+
730
+ _param = self._projects_get_serialize(
731
+ project_id=project_id,
732
+ _request_auth=_request_auth,
733
+ _content_type=_content_type,
734
+ _headers=_headers,
735
+ _host_index=_host_index
736
+ )
737
+
738
+ _response_types_map: Dict[str, Optional[str]] = {
739
+ '200': "Project",
740
+ '400': "Problem",
741
+ '401': "Problem",
742
+ '403': "Problem",
743
+ '404': "Problem",
744
+ '429': "Problem",
745
+ }
746
+ response_data = self.api_client.call_api(
747
+ *_param,
748
+ _request_timeout=_request_timeout
749
+ )
750
+ response_data.read()
751
+ return self.api_client.response_deserialize(
752
+ response_data=response_data,
753
+ response_types_map=_response_types_map,
754
+ )
755
+
756
+
757
+ @validate_call
758
+ def projects_get_without_preload_content(
759
+ self,
760
+ project_id: Annotated[StrictStr, Field(description="The unique identifier of the project")],
761
+ _request_timeout: Union[
762
+ None,
763
+ Annotated[StrictFloat, Field(gt=0)],
764
+ Tuple[
765
+ Annotated[StrictFloat, Field(gt=0)],
766
+ Annotated[StrictFloat, Field(gt=0)]
767
+ ]
768
+ ] = None,
769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
770
+ _content_type: Optional[StrictStr] = None,
771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
773
+ ) -> RESTResponseType:
774
+ """Get a project
775
+
776
+ Get a specific project by its ID. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
777
+
778
+ :param project_id: The unique identifier of the project (required)
779
+ :type project_id: str
780
+ :param _request_timeout: timeout setting for this request. If one
781
+ number provided, it will be total request
782
+ timeout. It can also be a pair (tuple) of
783
+ (connection, read) timeouts.
784
+ :type _request_timeout: int, tuple(int, int), optional
785
+ :param _request_auth: set to override the auth_settings for an a single
786
+ request; this effectively ignores the
787
+ authentication in the spec for a single request.
788
+ :type _request_auth: dict, optional
789
+ :param _content_type: force content-type for the request.
790
+ :type _content_type: str, Optional
791
+ :param _headers: set to override the headers for a single
792
+ request; this effectively ignores the headers
793
+ in the spec for a single request.
794
+ :type _headers: dict, optional
795
+ :param _host_index: set to override the host_index for a single
796
+ request; this effectively ignores the host_index
797
+ in the spec for a single request.
798
+ :type _host_index: int, optional
799
+ :return: Returns the result object.
800
+ """ # noqa: E501
801
+
802
+ _param = self._projects_get_serialize(
803
+ project_id=project_id,
804
+ _request_auth=_request_auth,
805
+ _content_type=_content_type,
806
+ _headers=_headers,
807
+ _host_index=_host_index
808
+ )
809
+
810
+ _response_types_map: Dict[str, Optional[str]] = {
811
+ '200': "Project",
812
+ '400': "Problem",
813
+ '401': "Problem",
814
+ '403': "Problem",
815
+ '404': "Problem",
816
+ '429': "Problem",
817
+ }
818
+ response_data = self.api_client.call_api(
819
+ *_param,
820
+ _request_timeout=_request_timeout
821
+ )
822
+ return response_data.response
823
+
824
+
825
+ def _projects_get_serialize(
826
+ self,
827
+ project_id,
828
+ _request_auth,
829
+ _content_type,
830
+ _headers,
831
+ _host_index,
832
+ ) -> RequestSerialized:
833
+
834
+ _host = None
835
+
836
+ _collection_formats: Dict[str, str] = {
837
+ }
838
+
839
+ _path_params: Dict[str, str] = {}
840
+ _query_params: List[Tuple[str, str]] = []
841
+ _header_params: Dict[str, Optional[str]] = _headers or {}
842
+ _form_params: List[Tuple[str, str]] = []
843
+ _files: Dict[
844
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
845
+ ] = {}
846
+ _body_params: Optional[bytes] = None
847
+
848
+ # process the path parameters
849
+ if project_id is not None:
850
+ _path_params['project_id'] = project_id
851
+ # process the query parameters
852
+ # process the header parameters
853
+ # process the form parameters
854
+ # process the body parameter
855
+
856
+
857
+ # set the HTTP header `Accept`
858
+ if 'Accept' not in _header_params:
859
+ _header_params['Accept'] = self.api_client.select_header_accept(
860
+ [
861
+ 'application/json',
862
+ 'application/problem+json'
863
+ ]
864
+ )
865
+
866
+
867
+ # authentication setting
868
+ _auth_settings: List[str] = [
869
+ 'bearerAuth'
870
+ ]
871
+
872
+ return self.api_client.param_serialize(
873
+ method='GET',
874
+ resource_path='/v2/projects/{project_id}',
875
+ path_params=_path_params,
876
+ query_params=_query_params,
877
+ header_params=_header_params,
878
+ body=_body_params,
879
+ post_params=_form_params,
880
+ files=_files,
881
+ auth_settings=_auth_settings,
882
+ collection_formats=_collection_formats,
883
+ _host=_host,
884
+ _request_auth=_request_auth
885
+ )
886
+
887
+
888
+
889
+
890
+ @validate_call
891
+ def projects_list(
892
+ self,
893
+ space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
894
+ limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
895
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
896
+ _request_timeout: Union[
897
+ None,
898
+ Annotated[StrictFloat, Field(gt=0)],
899
+ Tuple[
900
+ Annotated[StrictFloat, Field(gt=0)],
901
+ Annotated[StrictFloat, Field(gt=0)]
902
+ ]
903
+ ] = None,
904
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
905
+ _content_type: Optional[StrictStr] = None,
906
+ _headers: Optional[Dict[StrictStr, Any]] = None,
907
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
908
+ ) -> ProjectsList200Response:
909
+ """List projects
910
+
911
+ List projects the user has access to. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
912
+
913
+ :param space_id: Filter search results to a particular space ID
914
+ :type space_id: str
915
+ :param limit: Maximum items to return
916
+ :type limit: int
917
+ :param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
918
+ :type cursor: str
919
+ :param _request_timeout: timeout setting for this request. If one
920
+ number provided, it will be total request
921
+ timeout. It can also be a pair (tuple) of
922
+ (connection, read) timeouts.
923
+ :type _request_timeout: int, tuple(int, int), optional
924
+ :param _request_auth: set to override the auth_settings for an a single
925
+ request; this effectively ignores the
926
+ authentication in the spec for a single request.
927
+ :type _request_auth: dict, optional
928
+ :param _content_type: force content-type for the request.
929
+ :type _content_type: str, Optional
930
+ :param _headers: set to override the headers for a single
931
+ request; this effectively ignores the headers
932
+ in the spec for a single request.
933
+ :type _headers: dict, optional
934
+ :param _host_index: set to override the host_index for a single
935
+ request; this effectively ignores the host_index
936
+ in the spec for a single request.
937
+ :type _host_index: int, optional
938
+ :return: Returns the result object.
939
+ """ # noqa: E501
940
+
941
+ _param = self._projects_list_serialize(
942
+ space_id=space_id,
943
+ limit=limit,
944
+ cursor=cursor,
945
+ _request_auth=_request_auth,
946
+ _content_type=_content_type,
947
+ _headers=_headers,
948
+ _host_index=_host_index
949
+ )
950
+
951
+ _response_types_map: Dict[str, Optional[str]] = {
952
+ '200': "ProjectsList200Response",
953
+ '400': "Problem",
954
+ '401': "Problem",
955
+ '403': "Problem",
956
+ '429': "Problem",
957
+ }
958
+ response_data = self.api_client.call_api(
959
+ *_param,
960
+ _request_timeout=_request_timeout
961
+ )
962
+ response_data.read()
963
+ return self.api_client.response_deserialize(
964
+ response_data=response_data,
965
+ response_types_map=_response_types_map,
966
+ ).data
967
+
968
+
969
+ @validate_call
970
+ def projects_list_with_http_info(
971
+ self,
972
+ space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
973
+ limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
974
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
975
+ _request_timeout: Union[
976
+ None,
977
+ Annotated[StrictFloat, Field(gt=0)],
978
+ Tuple[
979
+ Annotated[StrictFloat, Field(gt=0)],
980
+ Annotated[StrictFloat, Field(gt=0)]
981
+ ]
982
+ ] = None,
983
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
984
+ _content_type: Optional[StrictStr] = None,
985
+ _headers: Optional[Dict[StrictStr, Any]] = None,
986
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
987
+ ) -> ApiResponse[ProjectsList200Response]:
988
+ """List projects
989
+
990
+ List projects the user has access to. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
991
+
992
+ :param space_id: Filter search results to a particular space ID
993
+ :type space_id: str
994
+ :param limit: Maximum items to return
995
+ :type limit: int
996
+ :param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
997
+ :type cursor: str
998
+ :param _request_timeout: timeout setting for this request. If one
999
+ number provided, it will be total request
1000
+ timeout. It can also be a pair (tuple) of
1001
+ (connection, read) timeouts.
1002
+ :type _request_timeout: int, tuple(int, int), optional
1003
+ :param _request_auth: set to override the auth_settings for an a single
1004
+ request; this effectively ignores the
1005
+ authentication in the spec for a single request.
1006
+ :type _request_auth: dict, optional
1007
+ :param _content_type: force content-type for the request.
1008
+ :type _content_type: str, Optional
1009
+ :param _headers: set to override the headers for a single
1010
+ request; this effectively ignores the headers
1011
+ in the spec for a single request.
1012
+ :type _headers: dict, optional
1013
+ :param _host_index: set to override the host_index for a single
1014
+ request; this effectively ignores the host_index
1015
+ in the spec for a single request.
1016
+ :type _host_index: int, optional
1017
+ :return: Returns the result object.
1018
+ """ # noqa: E501
1019
+
1020
+ _param = self._projects_list_serialize(
1021
+ space_id=space_id,
1022
+ limit=limit,
1023
+ cursor=cursor,
1024
+ _request_auth=_request_auth,
1025
+ _content_type=_content_type,
1026
+ _headers=_headers,
1027
+ _host_index=_host_index
1028
+ )
1029
+
1030
+ _response_types_map: Dict[str, Optional[str]] = {
1031
+ '200': "ProjectsList200Response",
1032
+ '400': "Problem",
1033
+ '401': "Problem",
1034
+ '403': "Problem",
1035
+ '429': "Problem",
1036
+ }
1037
+ response_data = self.api_client.call_api(
1038
+ *_param,
1039
+ _request_timeout=_request_timeout
1040
+ )
1041
+ response_data.read()
1042
+ return self.api_client.response_deserialize(
1043
+ response_data=response_data,
1044
+ response_types_map=_response_types_map,
1045
+ )
1046
+
1047
+
1048
+ @validate_call
1049
+ def projects_list_without_preload_content(
1050
+ self,
1051
+ space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
1052
+ limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
1053
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
1054
+ _request_timeout: Union[
1055
+ None,
1056
+ Annotated[StrictFloat, Field(gt=0)],
1057
+ Tuple[
1058
+ Annotated[StrictFloat, Field(gt=0)],
1059
+ Annotated[StrictFloat, Field(gt=0)]
1060
+ ]
1061
+ ] = None,
1062
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1063
+ _content_type: Optional[StrictStr] = None,
1064
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1065
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1066
+ ) -> RESTResponseType:
1067
+ """List projects
1068
+
1069
+ List projects the user has access to. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
1070
+
1071
+ :param space_id: Filter search results to a particular space ID
1072
+ :type space_id: str
1073
+ :param limit: Maximum items to return
1074
+ :type limit: int
1075
+ :param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
1076
+ :type cursor: str
1077
+ :param _request_timeout: timeout setting for this request. If one
1078
+ number provided, it will be total request
1079
+ timeout. It can also be a pair (tuple) of
1080
+ (connection, read) timeouts.
1081
+ :type _request_timeout: int, tuple(int, int), optional
1082
+ :param _request_auth: set to override the auth_settings for an a single
1083
+ request; this effectively ignores the
1084
+ authentication in the spec for a single request.
1085
+ :type _request_auth: dict, optional
1086
+ :param _content_type: force content-type for the request.
1087
+ :type _content_type: str, Optional
1088
+ :param _headers: set to override the headers for a single
1089
+ request; this effectively ignores the headers
1090
+ in the spec for a single request.
1091
+ :type _headers: dict, optional
1092
+ :param _host_index: set to override the host_index for a single
1093
+ request; this effectively ignores the host_index
1094
+ in the spec for a single request.
1095
+ :type _host_index: int, optional
1096
+ :return: Returns the result object.
1097
+ """ # noqa: E501
1098
+
1099
+ _param = self._projects_list_serialize(
1100
+ space_id=space_id,
1101
+ limit=limit,
1102
+ cursor=cursor,
1103
+ _request_auth=_request_auth,
1104
+ _content_type=_content_type,
1105
+ _headers=_headers,
1106
+ _host_index=_host_index
1107
+ )
1108
+
1109
+ _response_types_map: Dict[str, Optional[str]] = {
1110
+ '200': "ProjectsList200Response",
1111
+ '400': "Problem",
1112
+ '401': "Problem",
1113
+ '403': "Problem",
1114
+ '429': "Problem",
1115
+ }
1116
+ response_data = self.api_client.call_api(
1117
+ *_param,
1118
+ _request_timeout=_request_timeout
1119
+ )
1120
+ return response_data.response
1121
+
1122
+
1123
+ def _projects_list_serialize(
1124
+ self,
1125
+ space_id,
1126
+ limit,
1127
+ cursor,
1128
+ _request_auth,
1129
+ _content_type,
1130
+ _headers,
1131
+ _host_index,
1132
+ ) -> RequestSerialized:
1133
+
1134
+ _host = None
1135
+
1136
+ _collection_formats: Dict[str, str] = {
1137
+ }
1138
+
1139
+ _path_params: Dict[str, str] = {}
1140
+ _query_params: List[Tuple[str, str]] = []
1141
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1142
+ _form_params: List[Tuple[str, str]] = []
1143
+ _files: Dict[
1144
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1145
+ ] = {}
1146
+ _body_params: Optional[bytes] = None
1147
+
1148
+ # process the path parameters
1149
+ # process the query parameters
1150
+ if space_id is not None:
1151
+
1152
+ _query_params.append(('space_id', space_id))
1153
+
1154
+ if limit is not None:
1155
+
1156
+ _query_params.append(('limit', limit))
1157
+
1158
+ if cursor is not None:
1159
+
1160
+ _query_params.append(('cursor', cursor))
1161
+
1162
+ # process the header parameters
1163
+ # process the form parameters
1164
+ # process the body parameter
1165
+
1166
+
1167
+ # set the HTTP header `Accept`
1168
+ if 'Accept' not in _header_params:
1169
+ _header_params['Accept'] = self.api_client.select_header_accept(
1170
+ [
1171
+ 'application/json',
1172
+ 'application/problem+json'
1173
+ ]
1174
+ )
1175
+
1176
+
1177
+ # authentication setting
1178
+ _auth_settings: List[str] = [
1179
+ 'bearerAuth'
1180
+ ]
1181
+
1182
+ return self.api_client.param_serialize(
1183
+ method='GET',
1184
+ resource_path='/v2/projects',
1185
+ path_params=_path_params,
1186
+ query_params=_query_params,
1187
+ header_params=_header_params,
1188
+ body=_body_params,
1189
+ post_params=_form_params,
1190
+ files=_files,
1191
+ auth_settings=_auth_settings,
1192
+ collection_formats=_collection_formats,
1193
+ _host=_host,
1194
+ _request_auth=_request_auth
1195
+ )
1196
+
1197
+