graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.29.0a20250114__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. graphscope/flex/rest/__init__.py +59 -44
  2. graphscope/flex/rest/api/__init__.py +2 -4
  3. graphscope/flex/rest/api/alert_api.py +721 -394
  4. graphscope/flex/rest/api/{legacy_api.py → data_source_api.py} +260 -189
  5. graphscope/flex/rest/api/deployment_api.py +388 -138
  6. graphscope/flex/rest/api/graph_api.py +858 -260
  7. graphscope/flex/rest/api/job_api.py +286 -203
  8. graphscope/flex/rest/api/service_api.py +320 -39
  9. graphscope/flex/rest/api/{procedure_api.py → stored_procedure_api.py} +296 -237
  10. graphscope/flex/rest/api/utils_api.py +18 -13
  11. graphscope/flex/rest/api_client.py +60 -30
  12. graphscope/flex/rest/configuration.py +19 -5
  13. graphscope/flex/rest/exceptions.py +2 -2
  14. graphscope/flex/rest/models/__init__.py +57 -40
  15. graphscope/flex/rest/models/{vertex_type.py → base_edge_type.py} +25 -25
  16. graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner.py → base_edge_type_vertex_type_pair_relations_inner.py} +17 -17
  17. graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner_x_csr_params.py → base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py} +11 -11
  18. graphscope/flex/rest/models/{model_property.py → base_property_meta.py} +28 -19
  19. graphscope/flex/rest/models/base_vertex_type.py +96 -0
  20. graphscope/flex/rest/models/{procedure_params_inner.py → base_vertex_type_x_csr_params.py} +15 -17
  21. graphscope/flex/rest/models/column_mapping.py +13 -13
  22. graphscope/flex/rest/models/{edge_mapping_source_vertex_mappings_inner_column.py → column_mapping_column.py} +12 -12
  23. graphscope/flex/rest/models/{schema_mapping_loading_config_data_source.py → create_alert_receiver_request.py} +29 -24
  24. graphscope/flex/rest/models/{alert_rule.py → create_alert_rule_request.py} +19 -25
  25. graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
  26. graphscope/flex/rest/models/create_edge_type.py +114 -0
  27. graphscope/flex/rest/models/{graph.py → create_graph_request.py} +27 -33
  28. graphscope/flex/rest/models/create_graph_response.py +88 -0
  29. graphscope/flex/rest/models/{model_schema.py → create_graph_schema_request.py} +25 -25
  30. graphscope/flex/rest/models/{groot_vertex_type.py → create_property_meta.py} +32 -25
  31. graphscope/flex/rest/models/{graph_stored_procedures.py → create_stored_proc_request.py} +26 -23
  32. graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
  33. graphscope/flex/rest/models/create_vertex_type.py +108 -0
  34. graphscope/flex/rest/models/{groot_dataloading_job_config.py → dataloading_job_config.py} +45 -21
  35. graphscope/flex/rest/models/{groot_dataloading_job_config_edges_inner.py → dataloading_job_config_edges_inner.py} +12 -12
  36. graphscope/flex/rest/models/{schema_mapping_loading_config.py → dataloading_job_config_loading_config.py} +16 -22
  37. graphscope/flex/rest/models/{schema_mapping_loading_config_format.py → dataloading_job_config_loading_config_format.py} +12 -12
  38. graphscope/flex/rest/models/{groot_edge_type_relations_inner.py → dataloading_job_config_vertices_inner.py} +15 -17
  39. graphscope/flex/rest/models/dataloading_mr_job_config.py +88 -0
  40. graphscope/flex/rest/models/date_type.py +88 -0
  41. graphscope/flex/rest/models/edge_mapping.py +23 -25
  42. graphscope/flex/rest/models/edge_mapping_type_triplet.py +12 -12
  43. graphscope/flex/rest/models/error.py +90 -0
  44. graphscope/flex/rest/models/{alert_message.py → get_alert_message_response.py} +23 -32
  45. graphscope/flex/rest/models/{alert_receiver.py → get_alert_receiver_response.py} +22 -25
  46. graphscope/flex/rest/models/{connection_status.py → get_alert_rule_response.py} +37 -33
  47. graphscope/flex/rest/models/{edge_type.py → get_edge_type.py} +33 -27
  48. graphscope/flex/rest/models/get_graph_response.py +139 -0
  49. graphscope/flex/rest/models/{groot_schema.py → get_graph_schema_response.py} +32 -32
  50. graphscope/flex/rest/models/get_pod_log_response.py +88 -0
  51. graphscope/flex/rest/models/{edge_mapping_destination_vertex_mappings_inner.py → get_property_meta.py} +34 -19
  52. graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
  53. graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
  54. graphscope/flex/rest/models/{procedure.py → get_stored_proc_response.py} +37 -36
  55. graphscope/flex/rest/models/{groot_edge_type.py → get_vertex_type.py} +33 -31
  56. graphscope/flex/rest/models/gs_data_type.py +152 -0
  57. graphscope/flex/rest/models/job_status.py +14 -17
  58. graphscope/flex/rest/models/{connection.py → long_text.py} +20 -15
  59. graphscope/flex/rest/models/node_status.py +15 -15
  60. graphscope/flex/rest/models/parameter.py +96 -0
  61. graphscope/flex/rest/models/{deployment_info_graphs_info_value.py → pod_status.py} +34 -20
  62. graphscope/flex/rest/models/{property_property_type.py → primitive_type.py} +16 -19
  63. graphscope/flex/rest/models/resource_usage.py +92 -0
  64. graphscope/flex/rest/models/{deployment_info.py → running_deployment_info.py} +42 -45
  65. graphscope/flex/rest/models/running_deployment_status.py +124 -0
  66. graphscope/flex/rest/models/schema_mapping.py +18 -26
  67. graphscope/flex/rest/models/service_status.py +29 -13
  68. graphscope/flex/rest/models/service_status_sdk_endpoints.py +8 -8
  69. graphscope/flex/rest/models/start_service_request.py +11 -11
  70. graphscope/flex/rest/models/{groot_graph.py → stored_procedure_meta.py} +46 -36
  71. graphscope/flex/rest/models/string_type.py +92 -0
  72. graphscope/flex/rest/models/string_type_string.py +124 -0
  73. graphscope/flex/rest/models/temporal_type.py +92 -0
  74. graphscope/flex/rest/models/temporal_type_temporal.py +138 -0
  75. graphscope/flex/rest/models/time_stamp_type.py +88 -0
  76. graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
  77. graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
  78. graphscope/flex/rest/models/upload_file_response.py +90 -0
  79. graphscope/flex/rest/models/vertex_mapping.py +13 -13
  80. graphscope/flex/rest/rest.py +4 -2
  81. graphscope_flex-0.29.0a20250114.dist-info/METADATA +19 -0
  82. graphscope_flex-0.29.0a20250114.dist-info/RECORD +86 -0
  83. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250114.dist-info}/WHEEL +1 -1
  84. graphscope/flex/rest/api/connection_api.py +0 -550
  85. graphscope/flex/rest/api/datasource_api.py +0 -2308
  86. graphscope/flex/rest/models/data_source.py +0 -106
  87. graphscope/flex/rest/models/deployment_status.py +0 -108
  88. graphscope/flex/rest/models/edge_data_source.py +0 -112
  89. graphscope/flex/rest/models/edge_mapping_source_vertex_mappings_inner.py +0 -92
  90. graphscope/flex/rest/models/groot_graph_gremlin_interface.py +0 -94
  91. graphscope/flex/rest/models/groot_property.py +0 -104
  92. graphscope/flex/rest/models/update_alert_messages_request.py +0 -110
  93. graphscope/flex/rest/models/vertex_data_source.py +0 -104
  94. graphscope_flex-0.27.0.dist-info/METADATA +0 -17
  95. graphscope_flex-0.27.0.dist-info/RECORD +0 -71
  96. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250114.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
5
 
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
19
19
 
20
20
  from pydantic import StrictBytes, StrictStr
21
21
  from typing import Optional, Union
22
+ from graphscope.flex.rest.models.upload_file_response import UploadFileResponse
22
23
 
23
24
  from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
24
25
  from graphscope.flex.rest.api_response import ApiResponse
@@ -54,7 +55,7 @@ class UtilsApi:
54
55
  _content_type: Optional[StrictStr] = None,
55
56
  _headers: Optional[Dict[StrictStr, Any]] = None,
56
57
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
- ) -> str:
58
+ ) -> UploadFileResponse:
58
59
  """upload_file
59
60
 
60
61
 
@@ -91,7 +92,8 @@ class UtilsApi:
91
92
  )
92
93
 
93
94
  _response_types_map: Dict[str, Optional[str]] = {
94
- '200': "str",
95
+ '200': "UploadFileResponse",
96
+ '500': "Error",
95
97
  }
96
98
  response_data = self.api_client.call_api(
97
99
  *_param,
@@ -120,7 +122,7 @@ class UtilsApi:
120
122
  _content_type: Optional[StrictStr] = None,
121
123
  _headers: Optional[Dict[StrictStr, Any]] = None,
122
124
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
- ) -> ApiResponse[str]:
125
+ ) -> ApiResponse[UploadFileResponse]:
124
126
  """upload_file
125
127
 
126
128
 
@@ -157,7 +159,8 @@ class UtilsApi:
157
159
  )
158
160
 
159
161
  _response_types_map: Dict[str, Optional[str]] = {
160
- '200': "str",
162
+ '200': "UploadFileResponse",
163
+ '500': "Error",
161
164
  }
162
165
  response_data = self.api_client.call_api(
163
166
  *_param,
@@ -223,7 +226,8 @@ class UtilsApi:
223
226
  )
224
227
 
225
228
  _response_types_map: Dict[str, Optional[str]] = {
226
- '200': "str",
229
+ '200': "UploadFileResponse",
230
+ '500': "Error",
227
231
  }
228
232
  response_data = self.api_client.call_api(
229
233
  *_param,
@@ -250,7 +254,7 @@ class UtilsApi:
250
254
  _query_params: List[Tuple[str, str]] = []
251
255
  _header_params: Dict[str, Optional[str]] = _headers or {}
252
256
  _form_params: List[Tuple[str, str]] = []
253
- _files: Dict[str, str] = {}
257
+ _files: Dict[str, Union[str, bytes]] = {}
254
258
  _body_params: Optional[bytes] = None
255
259
 
256
260
  # process the path parameters
@@ -263,11 +267,12 @@ class UtilsApi:
263
267
 
264
268
 
265
269
  # set the HTTP header `Accept`
266
- _header_params['Accept'] = self.api_client.select_header_accept(
267
- [
268
- 'application/json'
269
- ]
270
- )
270
+ if 'Accept' not in _header_params:
271
+ _header_params['Accept'] = self.api_client.select_header_accept(
272
+ [
273
+ 'application/json'
274
+ ]
275
+ )
271
276
 
272
277
  # set the HTTP header `Content-Type`
273
278
  if _content_type:
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
5
 
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -16,6 +16,7 @@
16
16
  import datetime
17
17
  from dateutil.parser import parse
18
18
  from enum import Enum
19
+ import decimal
19
20
  import json
20
21
  import mimetypes
21
22
  import os
@@ -23,7 +24,8 @@ import re
23
24
  import tempfile
24
25
 
25
26
  from urllib.parse import quote
26
- from typing import Tuple, Optional, List, Dict
27
+ from typing import Tuple, Optional, List, Dict, Union
28
+ from pydantic import SecretStr
27
29
 
28
30
  from graphscope.flex.rest.configuration import Configuration
29
31
  from graphscope.flex.rest.api_response import ApiResponse, T as ApiResponseT
@@ -66,6 +68,7 @@ class ApiClient:
66
68
  'bool': bool,
67
69
  'date': datetime.date,
68
70
  'datetime': datetime.datetime,
71
+ 'decimal': decimal.Decimal,
69
72
  'object': object,
70
73
  }
71
74
  _pool = None
@@ -208,7 +211,8 @@ class ApiClient:
208
211
  post_params,
209
212
  collection_formats
210
213
  )
211
- post_params.extend(self.files_parameters(files))
214
+ if files:
215
+ post_params.extend(self.files_parameters(files))
212
216
 
213
217
  # auth setting
214
218
  self.update_params_for_auth(
@@ -226,7 +230,7 @@ class ApiClient:
226
230
  body = self.sanitize_for_serialization(body)
227
231
 
228
232
  # request url
229
- if _host is None:
233
+ if _host is None or self.configuration.ignore_operation_servers:
230
234
  url = self.configuration.host + resource_path
231
235
  else:
232
236
  # use server/host defined in path or operation instead
@@ -313,7 +317,7 @@ class ApiClient:
313
317
  match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
314
318
  encoding = match.group(1) if match else "utf-8"
315
319
  response_text = response_data.data.decode(encoding)
316
- return_data = self.deserialize(response_text, response_type)
320
+ return_data = self.deserialize(response_text, response_type, content_type)
317
321
  finally:
318
322
  if not 200 <= response_data.status <= 299:
319
323
  raise ApiException.from_response(
@@ -333,9 +337,11 @@ class ApiClient:
333
337
  """Builds a JSON POST object.
334
338
 
335
339
  If obj is None, return None.
340
+ If obj is SecretStr, return obj.get_secret_value()
336
341
  If obj is str, int, long, float, bool, return directly.
337
342
  If obj is datetime.datetime, datetime.date
338
343
  convert to string in iso8601 format.
344
+ If obj is decimal.Decimal return string representation.
339
345
  If obj is list, sanitize each element in the list.
340
346
  If obj is dict, return the dict.
341
347
  If obj is OpenAPI model, return the properties dict.
@@ -345,6 +351,10 @@ class ApiClient:
345
351
  """
346
352
  if obj is None:
347
353
  return None
354
+ elif isinstance(obj, Enum):
355
+ return obj.value
356
+ elif isinstance(obj, SecretStr):
357
+ return obj.get_secret_value()
348
358
  elif isinstance(obj, self.PRIMITIVE_TYPES):
349
359
  return obj
350
360
  elif isinstance(obj, list):
@@ -357,6 +367,8 @@ class ApiClient:
357
367
  )
358
368
  elif isinstance(obj, (datetime.datetime, datetime.date)):
359
369
  return obj.isoformat()
370
+ elif isinstance(obj, decimal.Decimal):
371
+ return str(obj)
360
372
 
361
373
  elif isinstance(obj, dict):
362
374
  obj_dict = obj
@@ -366,28 +378,45 @@ class ApiClient:
366
378
  # and attributes which value is not None.
367
379
  # Convert attribute name to json key in
368
380
  # model definition for request.
369
- obj_dict = obj.to_dict()
381
+ if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
382
+ obj_dict = obj.to_dict()
383
+ else:
384
+ obj_dict = obj.__dict__
370
385
 
371
386
  return {
372
387
  key: self.sanitize_for_serialization(val)
373
388
  for key, val in obj_dict.items()
374
389
  }
375
390
 
376
- def deserialize(self, response_text, response_type):
391
+ def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
377
392
  """Deserializes response into an object.
378
393
 
379
394
  :param response: RESTResponse object to be deserialized.
380
395
  :param response_type: class literal for
381
396
  deserialized object, or string of class name.
397
+ :param content_type: content type of response.
382
398
 
383
399
  :return: deserialized object.
384
400
  """
385
401
 
386
402
  # fetch data from response object
387
- try:
388
- data = json.loads(response_text)
389
- except ValueError:
403
+ if content_type is None:
404
+ try:
405
+ data = json.loads(response_text)
406
+ except ValueError:
407
+ data = response_text
408
+ elif content_type.startswith("application/json"):
409
+ if response_text == "":
410
+ data = ""
411
+ else:
412
+ data = json.loads(response_text)
413
+ elif content_type.startswith("text/plain"):
390
414
  data = response_text
415
+ else:
416
+ raise ApiException(
417
+ status=0,
418
+ reason="Unsupported content type: {0}".format(content_type)
419
+ )
391
420
 
392
421
  return self.__deserialize(data, response_type)
393
422
 
@@ -431,6 +460,8 @@ class ApiClient:
431
460
  return self.__deserialize_date(data)
432
461
  elif klass == datetime.datetime:
433
462
  return self.__deserialize_datetime(data)
463
+ elif klass == decimal.Decimal:
464
+ return decimal.Decimal(data)
434
465
  elif issubclass(klass, Enum):
435
466
  return self.__deserialize_enum(data, klass)
436
467
  else:
@@ -505,31 +536,30 @@ class ApiClient:
505
536
 
506
537
  return "&".join(["=".join(map(str, item)) for item in new_params])
507
538
 
508
- def files_parameters(self, files=None):
539
+ def files_parameters(self, files: Dict[str, Union[str, bytes]]):
509
540
  """Builds form parameters.
510
541
 
511
542
  :param files: File parameters.
512
543
  :return: Form parameters with files.
513
544
  """
514
545
  params = []
515
-
516
- if files:
517
- for k, v in files.items():
518
- if not v:
519
- continue
520
- file_names = v if type(v) is list else [v]
521
- for n in file_names:
522
- with open(n, 'rb') as f:
523
- filename = os.path.basename(f.name)
524
- filedata = f.read()
525
- mimetype = (
526
- mimetypes.guess_type(filename)[0]
527
- or 'application/octet-stream'
528
- )
529
- params.append(
530
- tuple([k, tuple([filename, filedata, mimetype])])
531
- )
532
-
546
+ for k, v in files.items():
547
+ if isinstance(v, str):
548
+ with open(v, 'rb') as f:
549
+ filename = os.path.basename(f.name)
550
+ filedata = f.read()
551
+ elif isinstance(v, bytes):
552
+ filename = k
553
+ filedata = v
554
+ else:
555
+ raise ValueError("Unsupported file value")
556
+ mimetype = (
557
+ mimetypes.guess_type(filename)[0]
558
+ or 'application/octet-stream'
559
+ )
560
+ params.append(
561
+ tuple([k, tuple([filename, filedata, mimetype])])
562
+ )
533
563
  return params
534
564
 
535
565
  def select_header_accept(self, accepts: List[str]) -> Optional[str]:
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
5
 
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -33,6 +33,9 @@ class Configuration:
33
33
  """This class contains various settings of the API client.
34
34
 
35
35
  :param host: Base url.
36
+ :param ignore_operation_servers
37
+ Boolean to ignore operation servers for the API client.
38
+ Config will use `host` as the base url regardless of the operation servers.
36
39
  :param api_key: Dict to store API key(s).
37
40
  Each entry in the dict specifies an API key.
38
41
  The dict key is the name of the security scheme in the OAS specification.
@@ -55,6 +58,7 @@ class Configuration:
55
58
  values before.
56
59
  :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
57
60
  in PEM format.
61
+ :param retries: Number of retries for API requests.
58
62
 
59
63
  """
60
64
 
@@ -66,7 +70,11 @@ class Configuration:
66
70
  access_token=None,
67
71
  server_index=None, server_variables=None,
68
72
  server_operation_index=None, server_operation_variables=None,
73
+ ignore_operation_servers=False,
69
74
  ssl_ca_cert=None,
75
+ retries=None,
76
+ *,
77
+ debug: Optional[bool] = None
70
78
  ) -> None:
71
79
  """Constructor
72
80
  """
@@ -81,6 +89,9 @@ class Configuration:
81
89
  self.server_operation_variables = server_operation_variables or {}
82
90
  """Default server variables
83
91
  """
92
+ self.ignore_operation_servers = ignore_operation_servers
93
+ """Ignore operation servers
94
+ """
84
95
  self.temp_folder_path = None
85
96
  """Temp file folder for downloading files
86
97
  """
@@ -124,7 +135,10 @@ class Configuration:
124
135
  self.logger_file = None
125
136
  """Debug file location
126
137
  """
127
- self.debug = False
138
+ if debug is not None:
139
+ self.debug = debug
140
+ else:
141
+ self.__debug = False
128
142
  """Debug switch
129
143
  """
130
144
 
@@ -167,7 +181,7 @@ class Configuration:
167
181
  self.safe_chars_for_path_param = ''
168
182
  """Safe chars for path_param
169
183
  """
170
- self.retries = None
184
+ self.retries = retries
171
185
  """Adding retries to override urllib3 default value 3
172
186
  """
173
187
  # Enable client side validation
@@ -370,7 +384,7 @@ class Configuration:
370
384
  return "Python SDK Debug Report:\n"\
371
385
  "OS: {env}\n"\
372
386
  "Python Version: {pyversion}\n"\
373
- "Version of the API: 0.9.1\n"\
387
+ "Version of the API: 1.0.0\n"\
374
388
  "SDK Package Version: 1.0.0".\
375
389
  format(env=sys.platform, pyversion=sys.version)
376
390
 
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
5
 
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -4,9 +4,9 @@
4
4
  """
5
5
  GraphScope FLEX HTTP SERVICE API
6
6
 
7
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
8
8
 
9
- The version of the OpenAPI document: 0.9.1
9
+ The version of the OpenAPI document: 1.0.0
10
10
  Contact: graphscope@alibaba-inc.com
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
@@ -15,51 +15,68 @@
15
15
 
16
16
 
17
17
  # import models into model package
18
- from graphscope.flex.rest.models.alert_message import AlertMessage
19
- from graphscope.flex.rest.models.alert_receiver import AlertReceiver
20
- from graphscope.flex.rest.models.alert_rule import AlertRule
18
+ from graphscope.flex.rest.models.base_edge_type import BaseEdgeType
19
+ from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner import BaseEdgeTypeVertexTypePairRelationsInner
20
+ from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner_x_csr_params import BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams
21
+ from graphscope.flex.rest.models.base_property_meta import BasePropertyMeta
22
+ from graphscope.flex.rest.models.base_vertex_type import BaseVertexType
23
+ from graphscope.flex.rest.models.base_vertex_type_x_csr_params import BaseVertexTypeXCsrParams
21
24
  from graphscope.flex.rest.models.column_mapping import ColumnMapping
22
- from graphscope.flex.rest.models.connection import Connection
23
- from graphscope.flex.rest.models.connection_status import ConnectionStatus
24
- from graphscope.flex.rest.models.data_source import DataSource
25
- from graphscope.flex.rest.models.deployment_info import DeploymentInfo
26
- from graphscope.flex.rest.models.deployment_info_graphs_info_value import DeploymentInfoGraphsInfoValue
27
- from graphscope.flex.rest.models.deployment_status import DeploymentStatus
28
- from graphscope.flex.rest.models.edge_data_source import EdgeDataSource
25
+ from graphscope.flex.rest.models.column_mapping_column import ColumnMappingColumn
26
+ from graphscope.flex.rest.models.create_alert_receiver_request import CreateAlertReceiverRequest
27
+ from graphscope.flex.rest.models.create_alert_rule_request import CreateAlertRuleRequest
28
+ from graphscope.flex.rest.models.create_dataloading_job_response import CreateDataloadingJobResponse
29
+ from graphscope.flex.rest.models.create_edge_type import CreateEdgeType
30
+ from graphscope.flex.rest.models.create_graph_request import CreateGraphRequest
31
+ from graphscope.flex.rest.models.create_graph_response import CreateGraphResponse
32
+ from graphscope.flex.rest.models.create_graph_schema_request import CreateGraphSchemaRequest
33
+ from graphscope.flex.rest.models.create_property_meta import CreatePropertyMeta
34
+ from graphscope.flex.rest.models.create_stored_proc_request import CreateStoredProcRequest
35
+ from graphscope.flex.rest.models.create_stored_proc_response import CreateStoredProcResponse
36
+ from graphscope.flex.rest.models.create_vertex_type import CreateVertexType
37
+ from graphscope.flex.rest.models.dataloading_job_config import DataloadingJobConfig
38
+ from graphscope.flex.rest.models.dataloading_job_config_edges_inner import DataloadingJobConfigEdgesInner
39
+ from graphscope.flex.rest.models.dataloading_job_config_loading_config import DataloadingJobConfigLoadingConfig
40
+ from graphscope.flex.rest.models.dataloading_job_config_loading_config_format import DataloadingJobConfigLoadingConfigFormat
41
+ from graphscope.flex.rest.models.dataloading_job_config_vertices_inner import DataloadingJobConfigVerticesInner
42
+ from graphscope.flex.rest.models.dataloading_mr_job_config import DataloadingMRJobConfig
43
+ from graphscope.flex.rest.models.date_type import DateType
29
44
  from graphscope.flex.rest.models.edge_mapping import EdgeMapping
30
- from graphscope.flex.rest.models.edge_mapping_destination_vertex_mappings_inner import EdgeMappingDestinationVertexMappingsInner
31
- from graphscope.flex.rest.models.edge_mapping_source_vertex_mappings_inner import EdgeMappingSourceVertexMappingsInner
32
- from graphscope.flex.rest.models.edge_mapping_source_vertex_mappings_inner_column import EdgeMappingSourceVertexMappingsInnerColumn
33
45
  from graphscope.flex.rest.models.edge_mapping_type_triplet import EdgeMappingTypeTriplet
34
- from graphscope.flex.rest.models.edge_type import EdgeType
35
- from graphscope.flex.rest.models.edge_type_vertex_type_pair_relations_inner import EdgeTypeVertexTypePairRelationsInner
36
- from graphscope.flex.rest.models.edge_type_vertex_type_pair_relations_inner_x_csr_params import EdgeTypeVertexTypePairRelationsInnerXCsrParams
37
- from graphscope.flex.rest.models.graph import Graph
38
- from graphscope.flex.rest.models.graph_stored_procedures import GraphStoredProcedures
39
- from graphscope.flex.rest.models.groot_dataloading_job_config import GrootDataloadingJobConfig
40
- from graphscope.flex.rest.models.groot_dataloading_job_config_edges_inner import GrootDataloadingJobConfigEdgesInner
41
- from graphscope.flex.rest.models.groot_edge_type import GrootEdgeType
42
- from graphscope.flex.rest.models.groot_edge_type_relations_inner import GrootEdgeTypeRelationsInner
43
- from graphscope.flex.rest.models.groot_graph import GrootGraph
44
- from graphscope.flex.rest.models.groot_graph_gremlin_interface import GrootGraphGremlinInterface
45
- from graphscope.flex.rest.models.groot_property import GrootProperty
46
- from graphscope.flex.rest.models.groot_schema import GrootSchema
47
- from graphscope.flex.rest.models.groot_vertex_type import GrootVertexType
46
+ from graphscope.flex.rest.models.error import Error
47
+ from graphscope.flex.rest.models.gs_data_type import GSDataType
48
+ from graphscope.flex.rest.models.get_alert_message_response import GetAlertMessageResponse
49
+ from graphscope.flex.rest.models.get_alert_receiver_response import GetAlertReceiverResponse
50
+ from graphscope.flex.rest.models.get_alert_rule_response import GetAlertRuleResponse
51
+ from graphscope.flex.rest.models.get_edge_type import GetEdgeType
52
+ from graphscope.flex.rest.models.get_graph_response import GetGraphResponse
53
+ from graphscope.flex.rest.models.get_graph_schema_response import GetGraphSchemaResponse
54
+ from graphscope.flex.rest.models.get_pod_log_response import GetPodLogResponse
55
+ from graphscope.flex.rest.models.get_property_meta import GetPropertyMeta
56
+ from graphscope.flex.rest.models.get_resource_usage_response import GetResourceUsageResponse
57
+ from graphscope.flex.rest.models.get_storage_usage_response import GetStorageUsageResponse
58
+ from graphscope.flex.rest.models.get_stored_proc_response import GetStoredProcResponse
59
+ from graphscope.flex.rest.models.get_vertex_type import GetVertexType
48
60
  from graphscope.flex.rest.models.job_status import JobStatus
49
- from graphscope.flex.rest.models.model_property import ModelProperty
50
- from graphscope.flex.rest.models.model_schema import ModelSchema
61
+ from graphscope.flex.rest.models.long_text import LongText
51
62
  from graphscope.flex.rest.models.node_status import NodeStatus
52
- from graphscope.flex.rest.models.procedure import Procedure
53
- from graphscope.flex.rest.models.procedure_params_inner import ProcedureParamsInner
54
- from graphscope.flex.rest.models.property_property_type import PropertyPropertyType
63
+ from graphscope.flex.rest.models.parameter import Parameter
64
+ from graphscope.flex.rest.models.pod_status import PodStatus
65
+ from graphscope.flex.rest.models.primitive_type import PrimitiveType
66
+ from graphscope.flex.rest.models.resource_usage import ResourceUsage
67
+ from graphscope.flex.rest.models.running_deployment_info import RunningDeploymentInfo
68
+ from graphscope.flex.rest.models.running_deployment_status import RunningDeploymentStatus
55
69
  from graphscope.flex.rest.models.schema_mapping import SchemaMapping
56
- from graphscope.flex.rest.models.schema_mapping_loading_config import SchemaMappingLoadingConfig
57
- from graphscope.flex.rest.models.schema_mapping_loading_config_data_source import SchemaMappingLoadingConfigDataSource
58
- from graphscope.flex.rest.models.schema_mapping_loading_config_format import SchemaMappingLoadingConfigFormat
59
70
  from graphscope.flex.rest.models.service_status import ServiceStatus
60
71
  from graphscope.flex.rest.models.service_status_sdk_endpoints import ServiceStatusSdkEndpoints
61
72
  from graphscope.flex.rest.models.start_service_request import StartServiceRequest
62
- from graphscope.flex.rest.models.update_alert_messages_request import UpdateAlertMessagesRequest
63
- from graphscope.flex.rest.models.vertex_data_source import VertexDataSource
73
+ from graphscope.flex.rest.models.stored_procedure_meta import StoredProcedureMeta
74
+ from graphscope.flex.rest.models.string_type import StringType
75
+ from graphscope.flex.rest.models.string_type_string import StringTypeString
76
+ from graphscope.flex.rest.models.temporal_type import TemporalType
77
+ from graphscope.flex.rest.models.temporal_type_temporal import TemporalTypeTemporal
78
+ from graphscope.flex.rest.models.time_stamp_type import TimeStampType
79
+ from graphscope.flex.rest.models.update_alert_message_status_request import UpdateAlertMessageStatusRequest
80
+ from graphscope.flex.rest.models.update_stored_proc_request import UpdateStoredProcRequest
81
+ from graphscope.flex.rest.models.upload_file_response import UploadFileResponse
64
82
  from graphscope.flex.rest.models.vertex_mapping import VertexMapping
65
- from graphscope.flex.rest.models.vertex_type import VertexType
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
5
 
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,27 +18,27 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.model_property import ModelProperty
23
+ from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner import BaseEdgeTypeVertexTypePairRelationsInner
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
27
- class VertexType(BaseModel):
27
+ class BaseEdgeType(BaseModel):
28
28
  """
29
- VertexType
29
+ BaseEdgeType
30
30
  """ # noqa: E501
31
- type_id: Optional[StrictInt] = None
32
- type_name: Optional[StrictStr] = None
33
- properties: Optional[List[ModelProperty]] = None
31
+ type_name: StrictStr
32
+ vertex_type_pair_relations: List[BaseEdgeTypeVertexTypePairRelationsInner]
33
+ directed: Optional[StrictBool] = None
34
34
  primary_keys: Optional[List[StrictStr]] = None
35
- __properties: ClassVar[List[str]] = ["type_id", "type_name", "properties", "primary_keys"]
35
+ __properties: ClassVar[List[str]] = ["type_name", "vertex_type_pair_relations", "directed", "primary_keys"]
36
36
 
37
- model_config = {
38
- "populate_by_name": True,
39
- "validate_assignment": True,
40
- "protected_namespaces": (),
41
- }
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
42
 
43
43
 
44
44
  def to_str(self) -> str:
@@ -52,7 +52,7 @@ class VertexType(BaseModel):
52
52
 
53
53
  @classmethod
54
54
  def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of VertexType from a JSON string"""
55
+ """Create an instance of BaseEdgeType from a JSON string"""
56
56
  return cls.from_dict(json.loads(json_str))
57
57
 
58
58
  def to_dict(self) -> Dict[str, Any]:
@@ -73,18 +73,18 @@ class VertexType(BaseModel):
73
73
  exclude=excluded_fields,
74
74
  exclude_none=True,
75
75
  )
76
- # override the default output from pydantic by calling `to_dict()` of each item in properties (list)
76
+ # override the default output from pydantic by calling `to_dict()` of each item in vertex_type_pair_relations (list)
77
77
  _items = []
78
- if self.properties:
79
- for _item in self.properties:
80
- if _item:
81
- _items.append(_item.to_dict())
82
- _dict['properties'] = _items
78
+ if self.vertex_type_pair_relations:
79
+ for _item_vertex_type_pair_relations in self.vertex_type_pair_relations:
80
+ if _item_vertex_type_pair_relations:
81
+ _items.append(_item_vertex_type_pair_relations.to_dict())
82
+ _dict['vertex_type_pair_relations'] = _items
83
83
  return _dict
84
84
 
85
85
  @classmethod
86
86
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
- """Create an instance of VertexType from a dict"""
87
+ """Create an instance of BaseEdgeType from a dict"""
88
88
  if obj is None:
89
89
  return None
90
90
 
@@ -92,9 +92,9 @@ class VertexType(BaseModel):
92
92
  return cls.model_validate(obj)
93
93
 
94
94
  _obj = cls.model_validate({
95
- "type_id": obj.get("type_id"),
96
95
  "type_name": obj.get("type_name"),
97
- "properties": [ModelProperty.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None,
96
+ "vertex_type_pair_relations": [BaseEdgeTypeVertexTypePairRelationsInner.from_dict(_item) for _item in obj["vertex_type_pair_relations"]] if obj.get("vertex_type_pair_relations") is not None else None,
97
+ "directed": obj.get("directed"),
98
98
  "primary_keys": obj.get("primary_keys")
99
99
  })
100
100
  return _obj