robosystems-client 0.1.18__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (145) hide show
  1. robosystems_client/api/agent/auto_select_agent.py +10 -4
  2. robosystems_client/api/agent/batch_process_queries.py +9 -4
  3. robosystems_client/api/agent/execute_specific_agent.py +11 -4
  4. robosystems_client/api/agent/get_agent_metadata.py +4 -1
  5. robosystems_client/api/agent/list_agents.py +4 -1
  6. robosystems_client/api/agent/recommend_agent.py +4 -1
  7. robosystems_client/api/auth/check_password_strength.py +2 -0
  8. robosystems_client/api/auth/complete_sso_auth.py +3 -0
  9. robosystems_client/api/auth/forgot_password.py +6 -3
  10. robosystems_client/api/auth/generate_sso_token.py +3 -0
  11. robosystems_client/api/auth/get_captcha_config.py +1 -0
  12. robosystems_client/api/auth/get_current_auth_user.py +3 -0
  13. robosystems_client/api/auth/get_password_policy.py +1 -0
  14. robosystems_client/api/auth/login_user.py +7 -3
  15. robosystems_client/api/auth/logout_user.py +2 -0
  16. robosystems_client/api/auth/refresh_auth_session.py +3 -0
  17. robosystems_client/api/auth/register_user.py +11 -6
  18. robosystems_client/api/auth/resend_verification_email.py +8 -3
  19. robosystems_client/api/auth/reset_password.py +3 -0
  20. robosystems_client/api/auth/sso_token_exchange.py +7 -3
  21. robosystems_client/api/auth/validate_reset_token.py +2 -0
  22. robosystems_client/api/auth/verify_email.py +3 -0
  23. robosystems_client/api/backup/create_backup.py +14 -8
  24. robosystems_client/api/backup/get_backup_download_url.py +9 -4
  25. robosystems_client/api/backup/get_backup_stats.py +3 -1
  26. robosystems_client/api/backup/list_backups.py +7 -5
  27. robosystems_client/api/backup/restore_backup.py +27 -8
  28. robosystems_client/api/connections/create_connection.py +14 -8
  29. robosystems_client/api/connections/create_link_token.py +9 -4
  30. robosystems_client/api/connections/delete_connection.py +13 -8
  31. robosystems_client/api/connections/exchange_link_token.py +9 -4
  32. robosystems_client/api/connections/get_connection.py +9 -4
  33. robosystems_client/api/connections/get_connection_options.py +8 -4
  34. robosystems_client/api/connections/init_o_auth.py +3 -1
  35. robosystems_client/api/connections/list_connections.py +8 -4
  36. robosystems_client/api/connections/oauth_callback.py +10 -4
  37. robosystems_client/api/connections/sync_connection.py +13 -8
  38. robosystems_client/api/graph_analytics/get_graph_metrics.py +13 -8
  39. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +12 -8
  40. robosystems_client/api/graph_billing/get_current_graph_bill.py +9 -4
  41. robosystems_client/api/graph_billing/get_graph_billing_history.py +9 -4
  42. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +10 -4
  43. robosystems_client/api/graph_billing/get_graph_usage_details.py +10 -4
  44. robosystems_client/api/graph_credits/check_credit_balance.py +9 -4
  45. robosystems_client/api/graph_credits/check_storage_limits.py +9 -4
  46. robosystems_client/api/graph_credits/get_credit_summary.py +9 -4
  47. robosystems_client/api/graph_credits/get_storage_usage.py +8 -4
  48. robosystems_client/api/graph_credits/list_credit_transactions.py +9 -4
  49. robosystems_client/api/graph_health/get_database_health.py +9 -4
  50. robosystems_client/api/graph_info/get_database_info.py +9 -4
  51. robosystems_client/api/graph_limits/get_graph_limits.py +9 -4
  52. robosystems_client/api/{create → graphs}/create_graph.py +7 -5
  53. robosystems_client/api/{create → graphs}/get_available_extensions.py +2 -1
  54. robosystems_client/api/{user/get_user_graphs.py → graphs/get_graphs.py} +3 -1
  55. robosystems_client/api/{user/select_user_graph.py → graphs/select_graph.py} +13 -8
  56. robosystems_client/api/mcp/call_mcp_tool.py +18 -8
  57. robosystems_client/api/mcp/list_mcp_tools.py +12 -8
  58. robosystems_client/api/operations/cancel_operation.py +9 -3
  59. robosystems_client/api/operations/get_operation_status.py +8 -3
  60. robosystems_client/api/operations/stream_operation_events.py +8 -3
  61. robosystems_client/api/query/execute_cypher_query.py +49 -16
  62. robosystems_client/api/schema/export_graph_schema.py +3 -1
  63. robosystems_client/api/schema/{get_graph_schema_info.py → get_graph_schema.py} +37 -47
  64. robosystems_client/api/schema/validate_schema.py +10 -5
  65. robosystems_client/api/service_offerings/get_service_offerings.py +2 -0
  66. robosystems_client/api/status/get_service_status.py +1 -0
  67. robosystems_client/api/subgraphs/create_subgraph.py +3 -1
  68. robosystems_client/api/subgraphs/delete_subgraph.py +15 -7
  69. robosystems_client/api/subgraphs/get_subgraph_info.py +14 -7
  70. robosystems_client/api/subgraphs/get_subgraph_quota.py +10 -4
  71. robosystems_client/api/subgraphs/list_subgraphs.py +3 -1
  72. robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +287 -0
  73. robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +283 -0
  74. robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +260 -0
  75. robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +251 -0
  76. robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +283 -0
  77. robosystems_client/api/{backup/export_backup.py → tables/list_tables_v1_graphs_graph_id_tables_get.py} +36 -36
  78. robosystems_client/api/{schema/list_schema_extensions.py → tables/query_tables_v1_graphs_graph_id_tables_query_post.py} +67 -43
  79. robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +306 -0
  80. robosystems_client/api/user/create_user_api_key.py +2 -0
  81. robosystems_client/api/user/get_all_credit_summaries.py +6 -3
  82. robosystems_client/api/user/get_current_user.py +2 -0
  83. robosystems_client/api/user/list_user_api_keys.py +2 -0
  84. robosystems_client/api/user/revoke_user_api_key.py +7 -3
  85. robosystems_client/api/user/update_user.py +2 -0
  86. robosystems_client/api/user/update_user_api_key.py +2 -0
  87. robosystems_client/api/user/update_user_password.py +8 -3
  88. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +2 -0
  89. robosystems_client/api/user_analytics/get_user_usage_overview.py +2 -0
  90. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +2 -0
  91. robosystems_client/api/user_limits/get_shared_repository_limits.py +6 -4
  92. robosystems_client/api/user_limits/get_user_limits.py +3 -0
  93. robosystems_client/api/user_limits/get_user_usage.py +2 -0
  94. robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +11 -6
  95. robosystems_client/api/user_subscriptions/get_repository_credits.py +7 -3
  96. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +7 -3
  97. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +7 -3
  98. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +8 -3
  99. robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +12 -6
  100. robosystems_client/extensions/README.md +1 -212
  101. robosystems_client/extensions/__init__.py +12 -28
  102. robosystems_client/extensions/extensions.py +3 -17
  103. robosystems_client/extensions/operation_client.py +12 -4
  104. robosystems_client/extensions/query_client.py +38 -24
  105. robosystems_client/extensions/sse_client.py +11 -0
  106. robosystems_client/extensions/table_ingest_client.py +466 -0
  107. robosystems_client/models/__init__.py +39 -31
  108. robosystems_client/models/api_key_info.py +20 -0
  109. robosystems_client/models/backup_restore_request.py +1 -12
  110. robosystems_client/models/bulk_ingest_request.py +50 -0
  111. robosystems_client/models/bulk_ingest_response.py +137 -0
  112. robosystems_client/models/create_api_key_request.py +20 -0
  113. robosystems_client/models/create_graph_request.py +4 -3
  114. robosystems_client/models/{sso_login_request.py → delete_file_v1_graphs_graph_id_tables_files_file_id_delete_response_delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py} +9 -22
  115. robosystems_client/models/file_update_request.py +62 -0
  116. robosystems_client/models/file_upload_request.py +51 -0
  117. robosystems_client/models/file_upload_response.py +83 -0
  118. robosystems_client/models/{get_graph_schema_info_response_getgraphschemainfo.py → get_file_info_v1_graphs_graph_id_tables_files_file_id_get_response_get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py} +8 -5
  119. robosystems_client/models/{copy_response_error_details_type_0.py → get_graph_schema_response_getgraphschema.py} +5 -5
  120. robosystems_client/models/list_table_files_v1_graphs_graph_id_tables_table_name_files_get_response_list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +47 -0
  121. robosystems_client/models/table_info.py +107 -0
  122. robosystems_client/models/table_ingest_result.py +107 -0
  123. robosystems_client/models/table_list_response.py +81 -0
  124. robosystems_client/models/table_query_request.py +40 -0
  125. robosystems_client/models/table_query_response.py +92 -0
  126. robosystems_client/models/{list_schema_extensions_response_listschemaextensions.py → update_file_v1_graphs_graph_id_tables_files_file_id_patch_response_update_file_v1_graphs_graph_id_tables_files_file_id_patch.py} +8 -5
  127. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/METADATA +15 -3
  128. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/RECORD +132 -127
  129. robosystems_client/api/auth/sso_login.py +0 -177
  130. robosystems_client/api/copy/copy_data_to_graph.py +0 -486
  131. robosystems_client/extensions/copy_client.py +0 -479
  132. robosystems_client/models/copy_response.py +0 -275
  133. robosystems_client/models/copy_response_status.py +0 -11
  134. robosystems_client/models/data_frame_copy_request.py +0 -125
  135. robosystems_client/models/data_frame_copy_request_format.py +0 -10
  136. robosystems_client/models/s3_copy_request.py +0 -378
  137. robosystems_client/models/s3_copy_request_file_format.py +0 -12
  138. robosystems_client/models/s3_copy_request_s3_url_style_type_0.py +0 -9
  139. robosystems_client/models/url_copy_request.py +0 -157
  140. robosystems_client/models/url_copy_request_file_format.py +0 -10
  141. robosystems_client/models/url_copy_request_headers_type_0.py +0 -44
  142. /robosystems_client/api/{copy → graphs}/__init__.py +0 -0
  143. /robosystems_client/api/{create → tables}/__init__.py +0 -0
  144. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/WHEEL +0 -0
  145. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,62 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="FileUpdateRequest")
9
+
10
+
11
+ @_attrs_define
12
+ class FileUpdateRequest:
13
+ """
14
+ Attributes:
15
+ file_size_bytes (int): Actual uploaded file size in bytes
16
+ row_count (Union[None, Unset, int]): Number of rows in the file
17
+ """
18
+
19
+ file_size_bytes: int
20
+ row_count: Union[None, Unset, int] = UNSET
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ file_size_bytes = self.file_size_bytes
24
+
25
+ row_count: Union[None, Unset, int]
26
+ if isinstance(self.row_count, Unset):
27
+ row_count = UNSET
28
+ else:
29
+ row_count = self.row_count
30
+
31
+ field_dict: dict[str, Any] = {}
32
+
33
+ field_dict.update(
34
+ {
35
+ "file_size_bytes": file_size_bytes,
36
+ }
37
+ )
38
+ if row_count is not UNSET:
39
+ field_dict["row_count"] = row_count
40
+
41
+ return field_dict
42
+
43
+ @classmethod
44
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
45
+ d = dict(src_dict)
46
+ file_size_bytes = d.pop("file_size_bytes")
47
+
48
+ def _parse_row_count(data: object) -> Union[None, Unset, int]:
49
+ if data is None:
50
+ return data
51
+ if isinstance(data, Unset):
52
+ return data
53
+ return cast(Union[None, Unset, int], data)
54
+
55
+ row_count = _parse_row_count(d.pop("row_count", UNSET))
56
+
57
+ file_update_request = cls(
58
+ file_size_bytes=file_size_bytes,
59
+ row_count=row_count,
60
+ )
61
+
62
+ return file_update_request
@@ -0,0 +1,51 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="FileUploadRequest")
9
+
10
+
11
+ @_attrs_define
12
+ class FileUploadRequest:
13
+ """
14
+ Attributes:
15
+ file_name (str): File name to upload
16
+ content_type (Union[Unset, str]): File MIME type Default: 'application/x-parquet'.
17
+ """
18
+
19
+ file_name: str
20
+ content_type: Union[Unset, str] = "application/x-parquet"
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ file_name = self.file_name
24
+
25
+ content_type = self.content_type
26
+
27
+ field_dict: dict[str, Any] = {}
28
+
29
+ field_dict.update(
30
+ {
31
+ "file_name": file_name,
32
+ }
33
+ )
34
+ if content_type is not UNSET:
35
+ field_dict["content_type"] = content_type
36
+
37
+ return field_dict
38
+
39
+ @classmethod
40
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
41
+ d = dict(src_dict)
42
+ file_name = d.pop("file_name")
43
+
44
+ content_type = d.pop("content_type", UNSET)
45
+
46
+ file_upload_request = cls(
47
+ file_name=file_name,
48
+ content_type=content_type,
49
+ )
50
+
51
+ return file_upload_request
@@ -0,0 +1,83 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="FileUploadResponse")
8
+
9
+
10
+ @_attrs_define
11
+ class FileUploadResponse:
12
+ """
13
+ Attributes:
14
+ upload_url (str): Presigned S3 upload URL
15
+ expires_in (int): URL expiration time in seconds
16
+ file_id (str): File tracking ID
17
+ s3_key (str): S3 object key
18
+ """
19
+
20
+ upload_url: str
21
+ expires_in: int
22
+ file_id: str
23
+ s3_key: str
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ upload_url = self.upload_url
28
+
29
+ expires_in = self.expires_in
30
+
31
+ file_id = self.file_id
32
+
33
+ s3_key = self.s3_key
34
+
35
+ field_dict: dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update(
38
+ {
39
+ "upload_url": upload_url,
40
+ "expires_in": expires_in,
41
+ "file_id": file_id,
42
+ "s3_key": s3_key,
43
+ }
44
+ )
45
+
46
+ return field_dict
47
+
48
+ @classmethod
49
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
50
+ d = dict(src_dict)
51
+ upload_url = d.pop("upload_url")
52
+
53
+ expires_in = d.pop("expires_in")
54
+
55
+ file_id = d.pop("file_id")
56
+
57
+ s3_key = d.pop("s3_key")
58
+
59
+ file_upload_response = cls(
60
+ upload_url=upload_url,
61
+ expires_in=expires_in,
62
+ file_id=file_id,
63
+ s3_key=s3_key,
64
+ )
65
+
66
+ file_upload_response.additional_properties = d
67
+ return file_upload_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -4,11 +4,14 @@ from typing import Any, TypeVar
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
- T = TypeVar("T", bound="GetGraphSchemaInfoResponseGetgraphschemainfo")
7
+ T = TypeVar(
8
+ "T",
9
+ bound="GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet",
10
+ )
8
11
 
9
12
 
10
13
  @_attrs_define
11
- class GetGraphSchemaInfoResponseGetgraphschemainfo:
14
+ class GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet:
12
15
  """ """
13
16
 
14
17
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -22,10 +25,10 @@ class GetGraphSchemaInfoResponseGetgraphschemainfo:
22
25
  @classmethod
23
26
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
27
  d = dict(src_dict)
25
- get_graph_schema_info_response_getgraphschemainfo = cls()
28
+ get_file_info_v1_graphs_graph_id_tables_files_file_id_get_response_get_file_info_v1_graphs_graph_id_tables_files_file_id_get = cls()
26
29
 
27
- get_graph_schema_info_response_getgraphschemainfo.additional_properties = d
28
- return get_graph_schema_info_response_getgraphschemainfo
30
+ get_file_info_v1_graphs_graph_id_tables_files_file_id_get_response_get_file_info_v1_graphs_graph_id_tables_files_file_id_get.additional_properties = d
31
+ return get_file_info_v1_graphs_graph_id_tables_files_file_id_get_response_get_file_info_v1_graphs_graph_id_tables_files_file_id_get
29
32
 
30
33
  @property
31
34
  def additional_keys(self) -> list[str]:
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
- T = TypeVar("T", bound="CopyResponseErrorDetailsType0")
7
+ T = TypeVar("T", bound="GetGraphSchemaResponseGetgraphschema")
8
8
 
9
9
 
10
10
  @_attrs_define
11
- class CopyResponseErrorDetailsType0:
11
+ class GetGraphSchemaResponseGetgraphschema:
12
12
  """ """
13
13
 
14
14
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -22,10 +22,10 @@ class CopyResponseErrorDetailsType0:
22
22
  @classmethod
23
23
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
24
  d = dict(src_dict)
25
- copy_response_error_details_type_0 = cls()
25
+ get_graph_schema_response_getgraphschema = cls()
26
26
 
27
- copy_response_error_details_type_0.additional_properties = d
28
- return copy_response_error_details_type_0
27
+ get_graph_schema_response_getgraphschema.additional_properties = d
28
+ return get_graph_schema_response_getgraphschema
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> list[str]:
@@ -0,0 +1,47 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar(
8
+ "T",
9
+ bound="ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet",
10
+ )
11
+
12
+
13
+ @_attrs_define
14
+ class ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet:
15
+ """ """
16
+
17
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
18
+
19
+ def to_dict(self) -> dict[str, Any]:
20
+ field_dict: dict[str, Any] = {}
21
+ field_dict.update(self.additional_properties)
22
+
23
+ return field_dict
24
+
25
+ @classmethod
26
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
27
+ d = dict(src_dict)
28
+ list_table_files_v1_graphs_graph_id_tables_table_name_files_get_response_list_table_files_v1_graphs_graph_id_tables_table_name_files_get = cls()
29
+
30
+ list_table_files_v1_graphs_graph_id_tables_table_name_files_get_response_list_table_files_v1_graphs_graph_id_tables_table_name_files_get.additional_properties = d
31
+ return list_table_files_v1_graphs_graph_id_tables_table_name_files_get_response_list_table_files_v1_graphs_graph_id_tables_table_name_files_get
32
+
33
+ @property
34
+ def additional_keys(self) -> list[str]:
35
+ return list(self.additional_properties.keys())
36
+
37
+ def __getitem__(self, key: str) -> Any:
38
+ return self.additional_properties[key]
39
+
40
+ def __setitem__(self, key: str, value: Any) -> None:
41
+ self.additional_properties[key] = value
42
+
43
+ def __delitem__(self, key: str) -> None:
44
+ del self.additional_properties[key]
45
+
46
+ def __contains__(self, key: str) -> bool:
47
+ return key in self.additional_properties
@@ -0,0 +1,107 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="TableInfo")
10
+
11
+
12
+ @_attrs_define
13
+ class TableInfo:
14
+ """
15
+ Attributes:
16
+ table_name (str): Table name
17
+ row_count (int): Approximate row count
18
+ file_count (Union[Unset, int]): Number of files Default: 0.
19
+ total_size_bytes (Union[Unset, int]): Total size in bytes Default: 0.
20
+ s3_location (Union[None, Unset, str]): S3 location for external tables
21
+ """
22
+
23
+ table_name: str
24
+ row_count: int
25
+ file_count: Union[Unset, int] = 0
26
+ total_size_bytes: Union[Unset, int] = 0
27
+ s3_location: Union[None, Unset, str] = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ table_name = self.table_name
32
+
33
+ row_count = self.row_count
34
+
35
+ file_count = self.file_count
36
+
37
+ total_size_bytes = self.total_size_bytes
38
+
39
+ s3_location: Union[None, Unset, str]
40
+ if isinstance(self.s3_location, Unset):
41
+ s3_location = UNSET
42
+ else:
43
+ s3_location = self.s3_location
44
+
45
+ field_dict: dict[str, Any] = {}
46
+ field_dict.update(self.additional_properties)
47
+ field_dict.update(
48
+ {
49
+ "table_name": table_name,
50
+ "row_count": row_count,
51
+ }
52
+ )
53
+ if file_count is not UNSET:
54
+ field_dict["file_count"] = file_count
55
+ if total_size_bytes is not UNSET:
56
+ field_dict["total_size_bytes"] = total_size_bytes
57
+ if s3_location is not UNSET:
58
+ field_dict["s3_location"] = s3_location
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
64
+ d = dict(src_dict)
65
+ table_name = d.pop("table_name")
66
+
67
+ row_count = d.pop("row_count")
68
+
69
+ file_count = d.pop("file_count", UNSET)
70
+
71
+ total_size_bytes = d.pop("total_size_bytes", UNSET)
72
+
73
+ def _parse_s3_location(data: object) -> Union[None, Unset, str]:
74
+ if data is None:
75
+ return data
76
+ if isinstance(data, Unset):
77
+ return data
78
+ return cast(Union[None, Unset, str], data)
79
+
80
+ s3_location = _parse_s3_location(d.pop("s3_location", UNSET))
81
+
82
+ table_info = cls(
83
+ table_name=table_name,
84
+ row_count=row_count,
85
+ file_count=file_count,
86
+ total_size_bytes=total_size_bytes,
87
+ s3_location=s3_location,
88
+ )
89
+
90
+ table_info.additional_properties = d
91
+ return table_info
92
+
93
+ @property
94
+ def additional_keys(self) -> list[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -0,0 +1,107 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="TableIngestResult")
10
+
11
+
12
+ @_attrs_define
13
+ class TableIngestResult:
14
+ """
15
+ Attributes:
16
+ table_name (str): Table name
17
+ status (str): Ingestion status (success/failed/skipped)
18
+ rows_ingested (Union[Unset, int]): Number of rows ingested Default: 0.
19
+ execution_time_ms (Union[Unset, float]): Ingestion time in milliseconds Default: 0.0.
20
+ error (Union[None, Unset, str]): Error message if failed
21
+ """
22
+
23
+ table_name: str
24
+ status: str
25
+ rows_ingested: Union[Unset, int] = 0
26
+ execution_time_ms: Union[Unset, float] = 0.0
27
+ error: Union[None, Unset, str] = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ table_name = self.table_name
32
+
33
+ status = self.status
34
+
35
+ rows_ingested = self.rows_ingested
36
+
37
+ execution_time_ms = self.execution_time_ms
38
+
39
+ error: Union[None, Unset, str]
40
+ if isinstance(self.error, Unset):
41
+ error = UNSET
42
+ else:
43
+ error = self.error
44
+
45
+ field_dict: dict[str, Any] = {}
46
+ field_dict.update(self.additional_properties)
47
+ field_dict.update(
48
+ {
49
+ "table_name": table_name,
50
+ "status": status,
51
+ }
52
+ )
53
+ if rows_ingested is not UNSET:
54
+ field_dict["rows_ingested"] = rows_ingested
55
+ if execution_time_ms is not UNSET:
56
+ field_dict["execution_time_ms"] = execution_time_ms
57
+ if error is not UNSET:
58
+ field_dict["error"] = error
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
64
+ d = dict(src_dict)
65
+ table_name = d.pop("table_name")
66
+
67
+ status = d.pop("status")
68
+
69
+ rows_ingested = d.pop("rows_ingested", UNSET)
70
+
71
+ execution_time_ms = d.pop("execution_time_ms", UNSET)
72
+
73
+ def _parse_error(data: object) -> Union[None, Unset, str]:
74
+ if data is None:
75
+ return data
76
+ if isinstance(data, Unset):
77
+ return data
78
+ return cast(Union[None, Unset, str], data)
79
+
80
+ error = _parse_error(d.pop("error", UNSET))
81
+
82
+ table_ingest_result = cls(
83
+ table_name=table_name,
84
+ status=status,
85
+ rows_ingested=rows_ingested,
86
+ execution_time_ms=execution_time_ms,
87
+ error=error,
88
+ )
89
+
90
+ table_ingest_result.additional_properties = d
91
+ return table_ingest_result
92
+
93
+ @property
94
+ def additional_keys(self) -> list[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -0,0 +1,81 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.table_info import TableInfo
9
+
10
+
11
+ T = TypeVar("T", bound="TableListResponse")
12
+
13
+
14
+ @_attrs_define
15
+ class TableListResponse:
16
+ """
17
+ Attributes:
18
+ tables (list['TableInfo']): List of tables
19
+ total_count (int): Total number of tables
20
+ """
21
+
22
+ tables: list["TableInfo"]
23
+ total_count: int
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ tables = []
28
+ for tables_item_data in self.tables:
29
+ tables_item = tables_item_data.to_dict()
30
+ tables.append(tables_item)
31
+
32
+ total_count = self.total_count
33
+
34
+ field_dict: dict[str, Any] = {}
35
+ field_dict.update(self.additional_properties)
36
+ field_dict.update(
37
+ {
38
+ "tables": tables,
39
+ "total_count": total_count,
40
+ }
41
+ )
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ from ..models.table_info import TableInfo
48
+
49
+ d = dict(src_dict)
50
+ tables = []
51
+ _tables = d.pop("tables")
52
+ for tables_item_data in _tables:
53
+ tables_item = TableInfo.from_dict(tables_item_data)
54
+
55
+ tables.append(tables_item)
56
+
57
+ total_count = d.pop("total_count")
58
+
59
+ table_list_response = cls(
60
+ tables=tables,
61
+ total_count=total_count,
62
+ )
63
+
64
+ table_list_response.additional_properties = d
65
+ return table_list_response
66
+
67
+ @property
68
+ def additional_keys(self) -> list[str]:
69
+ return list(self.additional_properties.keys())
70
+
71
+ def __getitem__(self, key: str) -> Any:
72
+ return self.additional_properties[key]
73
+
74
+ def __setitem__(self, key: str, value: Any) -> None:
75
+ self.additional_properties[key] = value
76
+
77
+ def __delitem__(self, key: str) -> None:
78
+ del self.additional_properties[key]
79
+
80
+ def __contains__(self, key: str) -> bool:
81
+ return key in self.additional_properties
@@ -0,0 +1,40 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+
6
+ T = TypeVar("T", bound="TableQueryRequest")
7
+
8
+
9
+ @_attrs_define
10
+ class TableQueryRequest:
11
+ """
12
+ Attributes:
13
+ sql (str): SQL query to execute on staging tables
14
+ """
15
+
16
+ sql: str
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ sql = self.sql
20
+
21
+ field_dict: dict[str, Any] = {}
22
+
23
+ field_dict.update(
24
+ {
25
+ "sql": sql,
26
+ }
27
+ )
28
+
29
+ return field_dict
30
+
31
+ @classmethod
32
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
33
+ d = dict(src_dict)
34
+ sql = d.pop("sql")
35
+
36
+ table_query_request = cls(
37
+ sql=sql,
38
+ )
39
+
40
+ return table_query_request