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
@@ -1,378 +0,0 @@
1
- from collections.abc import Mapping
2
- from typing import Any, Literal, TypeVar, Union, cast
3
-
4
- from attrs import define as _attrs_define
5
- from attrs import field as _attrs_field
6
-
7
- from ..models.s3_copy_request_file_format import S3CopyRequestFileFormat
8
- from ..models.s3_copy_request_s3_url_style_type_0 import S3CopyRequestS3UrlStyleType0
9
- from ..types import UNSET, Unset
10
-
11
- T = TypeVar("T", bound="S3CopyRequest")
12
-
13
-
14
- @_attrs_define
15
- class S3CopyRequest:
16
- r"""Request model for S3 copy operations.
17
-
18
- Copies data from S3 buckets into graph database tables using user-provided
19
- AWS credentials. Supports various file formats and bulk loading options.
20
-
21
- Attributes:
22
- table_name (str): Target Kuzu table name
23
- s3_path (str): Full S3 path (s3://bucket/key or s3://bucket/prefix/*.parquet)
24
- s3_access_key_id (str): AWS access key ID for S3 access
25
- s3_secret_access_key (str): AWS secret access key for S3 access
26
- ignore_errors (Union[Unset, bool]): Skip duplicate/invalid rows (enables upsert-like behavior) Default: True.
27
- extended_timeout (Union[Unset, bool]): Use extended timeout for large datasets Default: False.
28
- validate_schema (Union[Unset, bool]): Validate source schema against target table Default: True.
29
- source_type (Union[Literal['s3'], Unset]): Source type identifier Default: 's3'.
30
- s3_session_token (Union[None, Unset, str]): AWS session token (for temporary credentials)
31
- s3_region (Union[None, Unset, str]): S3 region Default: 'us-east-1'.
32
- s3_endpoint (Union[None, Unset, str]): Custom S3 endpoint (for S3-compatible storage)
33
- s3_url_style (Union[None, S3CopyRequestS3UrlStyleType0, Unset]): S3 URL style (vhost or path)
34
- file_format (Union[Unset, S3CopyRequestFileFormat]): File format of the S3 data Default:
35
- S3CopyRequestFileFormat.PARQUET.
36
- csv_delimiter (Union[None, Unset, str]): CSV delimiter Default: ','.
37
- csv_header (Union[None, Unset, bool]): CSV has header row Default: True.
38
- csv_quote (Union[None, Unset, str]): CSV quote character Default: '\\"'.
39
- csv_escape (Union[None, Unset, str]): CSV escape character Default: '\\'.
40
- csv_skip (Union[None, Unset, int]): Number of rows to skip Default: 0.
41
- allow_moved_paths (Union[None, Unset, bool]): Allow moved paths for Iceberg tables Default: False.
42
- max_file_size_gb (Union[None, Unset, int]): Maximum total file size limit in GB Default: 10.
43
- """
44
-
45
- table_name: str
46
- s3_path: str
47
- s3_access_key_id: str
48
- s3_secret_access_key: str
49
- ignore_errors: Union[Unset, bool] = True
50
- extended_timeout: Union[Unset, bool] = False
51
- validate_schema: Union[Unset, bool] = True
52
- source_type: Union[Literal["s3"], Unset] = "s3"
53
- s3_session_token: Union[None, Unset, str] = UNSET
54
- s3_region: Union[None, Unset, str] = "us-east-1"
55
- s3_endpoint: Union[None, Unset, str] = UNSET
56
- s3_url_style: Union[None, S3CopyRequestS3UrlStyleType0, Unset] = UNSET
57
- file_format: Union[Unset, S3CopyRequestFileFormat] = S3CopyRequestFileFormat.PARQUET
58
- csv_delimiter: Union[None, Unset, str] = ","
59
- csv_header: Union[None, Unset, bool] = True
60
- csv_quote: Union[None, Unset, str] = '\\"'
61
- csv_escape: Union[None, Unset, str] = "\\"
62
- csv_skip: Union[None, Unset, int] = 0
63
- allow_moved_paths: Union[None, Unset, bool] = False
64
- max_file_size_gb: Union[None, Unset, int] = 10
65
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
66
-
67
- def to_dict(self) -> dict[str, Any]:
68
- table_name = self.table_name
69
-
70
- s3_path = self.s3_path
71
-
72
- s3_access_key_id = self.s3_access_key_id
73
-
74
- s3_secret_access_key = self.s3_secret_access_key
75
-
76
- ignore_errors = self.ignore_errors
77
-
78
- extended_timeout = self.extended_timeout
79
-
80
- validate_schema = self.validate_schema
81
-
82
- source_type = self.source_type
83
-
84
- s3_session_token: Union[None, Unset, str]
85
- if isinstance(self.s3_session_token, Unset):
86
- s3_session_token = UNSET
87
- else:
88
- s3_session_token = self.s3_session_token
89
-
90
- s3_region: Union[None, Unset, str]
91
- if isinstance(self.s3_region, Unset):
92
- s3_region = UNSET
93
- else:
94
- s3_region = self.s3_region
95
-
96
- s3_endpoint: Union[None, Unset, str]
97
- if isinstance(self.s3_endpoint, Unset):
98
- s3_endpoint = UNSET
99
- else:
100
- s3_endpoint = self.s3_endpoint
101
-
102
- s3_url_style: Union[None, Unset, str]
103
- if isinstance(self.s3_url_style, Unset):
104
- s3_url_style = UNSET
105
- elif isinstance(self.s3_url_style, S3CopyRequestS3UrlStyleType0):
106
- s3_url_style = self.s3_url_style.value
107
- else:
108
- s3_url_style = self.s3_url_style
109
-
110
- file_format: Union[Unset, str] = UNSET
111
- if not isinstance(self.file_format, Unset):
112
- file_format = self.file_format.value
113
-
114
- csv_delimiter: Union[None, Unset, str]
115
- if isinstance(self.csv_delimiter, Unset):
116
- csv_delimiter = UNSET
117
- else:
118
- csv_delimiter = self.csv_delimiter
119
-
120
- csv_header: Union[None, Unset, bool]
121
- if isinstance(self.csv_header, Unset):
122
- csv_header = UNSET
123
- else:
124
- csv_header = self.csv_header
125
-
126
- csv_quote: Union[None, Unset, str]
127
- if isinstance(self.csv_quote, Unset):
128
- csv_quote = UNSET
129
- else:
130
- csv_quote = self.csv_quote
131
-
132
- csv_escape: Union[None, Unset, str]
133
- if isinstance(self.csv_escape, Unset):
134
- csv_escape = UNSET
135
- else:
136
- csv_escape = self.csv_escape
137
-
138
- csv_skip: Union[None, Unset, int]
139
- if isinstance(self.csv_skip, Unset):
140
- csv_skip = UNSET
141
- else:
142
- csv_skip = self.csv_skip
143
-
144
- allow_moved_paths: Union[None, Unset, bool]
145
- if isinstance(self.allow_moved_paths, Unset):
146
- allow_moved_paths = UNSET
147
- else:
148
- allow_moved_paths = self.allow_moved_paths
149
-
150
- max_file_size_gb: Union[None, Unset, int]
151
- if isinstance(self.max_file_size_gb, Unset):
152
- max_file_size_gb = UNSET
153
- else:
154
- max_file_size_gb = self.max_file_size_gb
155
-
156
- field_dict: dict[str, Any] = {}
157
- field_dict.update(self.additional_properties)
158
- field_dict.update(
159
- {
160
- "table_name": table_name,
161
- "s3_path": s3_path,
162
- "s3_access_key_id": s3_access_key_id,
163
- "s3_secret_access_key": s3_secret_access_key,
164
- }
165
- )
166
- if ignore_errors is not UNSET:
167
- field_dict["ignore_errors"] = ignore_errors
168
- if extended_timeout is not UNSET:
169
- field_dict["extended_timeout"] = extended_timeout
170
- if validate_schema is not UNSET:
171
- field_dict["validate_schema"] = validate_schema
172
- if source_type is not UNSET:
173
- field_dict["source_type"] = source_type
174
- if s3_session_token is not UNSET:
175
- field_dict["s3_session_token"] = s3_session_token
176
- if s3_region is not UNSET:
177
- field_dict["s3_region"] = s3_region
178
- if s3_endpoint is not UNSET:
179
- field_dict["s3_endpoint"] = s3_endpoint
180
- if s3_url_style is not UNSET:
181
- field_dict["s3_url_style"] = s3_url_style
182
- if file_format is not UNSET:
183
- field_dict["file_format"] = file_format
184
- if csv_delimiter is not UNSET:
185
- field_dict["csv_delimiter"] = csv_delimiter
186
- if csv_header is not UNSET:
187
- field_dict["csv_header"] = csv_header
188
- if csv_quote is not UNSET:
189
- field_dict["csv_quote"] = csv_quote
190
- if csv_escape is not UNSET:
191
- field_dict["csv_escape"] = csv_escape
192
- if csv_skip is not UNSET:
193
- field_dict["csv_skip"] = csv_skip
194
- if allow_moved_paths is not UNSET:
195
- field_dict["allow_moved_paths"] = allow_moved_paths
196
- if max_file_size_gb is not UNSET:
197
- field_dict["max_file_size_gb"] = max_file_size_gb
198
-
199
- return field_dict
200
-
201
- @classmethod
202
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
203
- d = dict(src_dict)
204
- table_name = d.pop("table_name")
205
-
206
- s3_path = d.pop("s3_path")
207
-
208
- s3_access_key_id = d.pop("s3_access_key_id")
209
-
210
- s3_secret_access_key = d.pop("s3_secret_access_key")
211
-
212
- ignore_errors = d.pop("ignore_errors", UNSET)
213
-
214
- extended_timeout = d.pop("extended_timeout", UNSET)
215
-
216
- validate_schema = d.pop("validate_schema", UNSET)
217
-
218
- source_type = cast(Union[Literal["s3"], Unset], d.pop("source_type", UNSET))
219
- if source_type != "s3" and not isinstance(source_type, Unset):
220
- raise ValueError(f"source_type must match const 's3', got '{source_type}'")
221
-
222
- def _parse_s3_session_token(data: object) -> Union[None, Unset, str]:
223
- if data is None:
224
- return data
225
- if isinstance(data, Unset):
226
- return data
227
- return cast(Union[None, Unset, str], data)
228
-
229
- s3_session_token = _parse_s3_session_token(d.pop("s3_session_token", UNSET))
230
-
231
- def _parse_s3_region(data: object) -> Union[None, Unset, str]:
232
- if data is None:
233
- return data
234
- if isinstance(data, Unset):
235
- return data
236
- return cast(Union[None, Unset, str], data)
237
-
238
- s3_region = _parse_s3_region(d.pop("s3_region", UNSET))
239
-
240
- def _parse_s3_endpoint(data: object) -> Union[None, Unset, str]:
241
- if data is None:
242
- return data
243
- if isinstance(data, Unset):
244
- return data
245
- return cast(Union[None, Unset, str], data)
246
-
247
- s3_endpoint = _parse_s3_endpoint(d.pop("s3_endpoint", UNSET))
248
-
249
- def _parse_s3_url_style(
250
- data: object,
251
- ) -> Union[None, S3CopyRequestS3UrlStyleType0, Unset]:
252
- if data is None:
253
- return data
254
- if isinstance(data, Unset):
255
- return data
256
- try:
257
- if not isinstance(data, str):
258
- raise TypeError()
259
- s3_url_style_type_0 = S3CopyRequestS3UrlStyleType0(data)
260
-
261
- return s3_url_style_type_0
262
- except: # noqa: E722
263
- pass
264
- return cast(Union[None, S3CopyRequestS3UrlStyleType0, Unset], data)
265
-
266
- s3_url_style = _parse_s3_url_style(d.pop("s3_url_style", UNSET))
267
-
268
- _file_format = d.pop("file_format", UNSET)
269
- file_format: Union[Unset, S3CopyRequestFileFormat]
270
- if isinstance(_file_format, Unset):
271
- file_format = UNSET
272
- else:
273
- file_format = S3CopyRequestFileFormat(_file_format)
274
-
275
- def _parse_csv_delimiter(data: object) -> Union[None, Unset, str]:
276
- if data is None:
277
- return data
278
- if isinstance(data, Unset):
279
- return data
280
- return cast(Union[None, Unset, str], data)
281
-
282
- csv_delimiter = _parse_csv_delimiter(d.pop("csv_delimiter", UNSET))
283
-
284
- def _parse_csv_header(data: object) -> Union[None, Unset, bool]:
285
- if data is None:
286
- return data
287
- if isinstance(data, Unset):
288
- return data
289
- return cast(Union[None, Unset, bool], data)
290
-
291
- csv_header = _parse_csv_header(d.pop("csv_header", UNSET))
292
-
293
- def _parse_csv_quote(data: object) -> Union[None, Unset, str]:
294
- if data is None:
295
- return data
296
- if isinstance(data, Unset):
297
- return data
298
- return cast(Union[None, Unset, str], data)
299
-
300
- csv_quote = _parse_csv_quote(d.pop("csv_quote", UNSET))
301
-
302
- def _parse_csv_escape(data: object) -> Union[None, Unset, str]:
303
- if data is None:
304
- return data
305
- if isinstance(data, Unset):
306
- return data
307
- return cast(Union[None, Unset, str], data)
308
-
309
- csv_escape = _parse_csv_escape(d.pop("csv_escape", UNSET))
310
-
311
- def _parse_csv_skip(data: object) -> Union[None, Unset, int]:
312
- if data is None:
313
- return data
314
- if isinstance(data, Unset):
315
- return data
316
- return cast(Union[None, Unset, int], data)
317
-
318
- csv_skip = _parse_csv_skip(d.pop("csv_skip", UNSET))
319
-
320
- def _parse_allow_moved_paths(data: object) -> Union[None, Unset, bool]:
321
- if data is None:
322
- return data
323
- if isinstance(data, Unset):
324
- return data
325
- return cast(Union[None, Unset, bool], data)
326
-
327
- allow_moved_paths = _parse_allow_moved_paths(d.pop("allow_moved_paths", UNSET))
328
-
329
- def _parse_max_file_size_gb(data: object) -> Union[None, Unset, int]:
330
- if data is None:
331
- return data
332
- if isinstance(data, Unset):
333
- return data
334
- return cast(Union[None, Unset, int], data)
335
-
336
- max_file_size_gb = _parse_max_file_size_gb(d.pop("max_file_size_gb", UNSET))
337
-
338
- s3_copy_request = cls(
339
- table_name=table_name,
340
- s3_path=s3_path,
341
- s3_access_key_id=s3_access_key_id,
342
- s3_secret_access_key=s3_secret_access_key,
343
- ignore_errors=ignore_errors,
344
- extended_timeout=extended_timeout,
345
- validate_schema=validate_schema,
346
- source_type=source_type,
347
- s3_session_token=s3_session_token,
348
- s3_region=s3_region,
349
- s3_endpoint=s3_endpoint,
350
- s3_url_style=s3_url_style,
351
- file_format=file_format,
352
- csv_delimiter=csv_delimiter,
353
- csv_header=csv_header,
354
- csv_quote=csv_quote,
355
- csv_escape=csv_escape,
356
- csv_skip=csv_skip,
357
- allow_moved_paths=allow_moved_paths,
358
- max_file_size_gb=max_file_size_gb,
359
- )
360
-
361
- s3_copy_request.additional_properties = d
362
- return s3_copy_request
363
-
364
- @property
365
- def additional_keys(self) -> list[str]:
366
- return list(self.additional_properties.keys())
367
-
368
- def __getitem__(self, key: str) -> Any:
369
- return self.additional_properties[key]
370
-
371
- def __setitem__(self, key: str, value: Any) -> None:
372
- self.additional_properties[key] = value
373
-
374
- def __delitem__(self, key: str) -> None:
375
- del self.additional_properties[key]
376
-
377
- def __contains__(self, key: str) -> bool:
378
- return key in self.additional_properties
@@ -1,12 +0,0 @@
1
- from enum import Enum
2
-
3
-
4
- class S3CopyRequestFileFormat(str, Enum):
5
- CSV = "csv"
6
- DELTA = "delta"
7
- ICEBERG = "iceberg"
8
- JSON = "json"
9
- PARQUET = "parquet"
10
-
11
- def __str__(self) -> str:
12
- return str(self.value)
@@ -1,9 +0,0 @@
1
- from enum import Enum
2
-
3
-
4
- class S3CopyRequestS3UrlStyleType0(str, Enum):
5
- PATH = "path"
6
- VHOST = "vhost"
7
-
8
- def __str__(self) -> str:
9
- return str(self.value)
@@ -1,157 +0,0 @@
1
- from collections.abc import Mapping
2
- from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union, cast
3
-
4
- from attrs import define as _attrs_define
5
- from attrs import field as _attrs_field
6
-
7
- from ..models.url_copy_request_file_format import URLCopyRequestFileFormat
8
- from ..types import UNSET, Unset
9
-
10
- if TYPE_CHECKING:
11
- from ..models.url_copy_request_headers_type_0 import URLCopyRequestHeadersType0
12
-
13
-
14
- T = TypeVar("T", bound="URLCopyRequest")
15
-
16
-
17
- @_attrs_define
18
- class URLCopyRequest:
19
- """Request model for URL copy operations (future).
20
-
21
- Attributes:
22
- table_name (str): Target Kuzu table name
23
- url (str): HTTP(S) URL to the data file
24
- file_format (URLCopyRequestFileFormat): File format of the URL data
25
- ignore_errors (Union[Unset, bool]): Skip duplicate/invalid rows (enables upsert-like behavior) Default: True.
26
- extended_timeout (Union[Unset, bool]): Use extended timeout for large datasets Default: False.
27
- validate_schema (Union[Unset, bool]): Validate source schema against target table Default: True.
28
- source_type (Union[Literal['url'], Unset]): Source type identifier Default: 'url'.
29
- headers (Union['URLCopyRequestHeadersType0', None, Unset]): Optional HTTP headers for authentication
30
- """
31
-
32
- table_name: str
33
- url: str
34
- file_format: URLCopyRequestFileFormat
35
- ignore_errors: Union[Unset, bool] = True
36
- extended_timeout: Union[Unset, bool] = False
37
- validate_schema: Union[Unset, bool] = True
38
- source_type: Union[Literal["url"], Unset] = "url"
39
- headers: Union["URLCopyRequestHeadersType0", None, Unset] = UNSET
40
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
41
-
42
- def to_dict(self) -> dict[str, Any]:
43
- from ..models.url_copy_request_headers_type_0 import URLCopyRequestHeadersType0
44
-
45
- table_name = self.table_name
46
-
47
- url = self.url
48
-
49
- file_format = self.file_format.value
50
-
51
- ignore_errors = self.ignore_errors
52
-
53
- extended_timeout = self.extended_timeout
54
-
55
- validate_schema = self.validate_schema
56
-
57
- source_type = self.source_type
58
-
59
- headers: Union[None, Unset, dict[str, Any]]
60
- if isinstance(self.headers, Unset):
61
- headers = UNSET
62
- elif isinstance(self.headers, URLCopyRequestHeadersType0):
63
- headers = self.headers.to_dict()
64
- else:
65
- headers = self.headers
66
-
67
- field_dict: dict[str, Any] = {}
68
- field_dict.update(self.additional_properties)
69
- field_dict.update(
70
- {
71
- "table_name": table_name,
72
- "url": url,
73
- "file_format": file_format,
74
- }
75
- )
76
- if ignore_errors is not UNSET:
77
- field_dict["ignore_errors"] = ignore_errors
78
- if extended_timeout is not UNSET:
79
- field_dict["extended_timeout"] = extended_timeout
80
- if validate_schema is not UNSET:
81
- field_dict["validate_schema"] = validate_schema
82
- if source_type is not UNSET:
83
- field_dict["source_type"] = source_type
84
- if headers is not UNSET:
85
- field_dict["headers"] = headers
86
-
87
- return field_dict
88
-
89
- @classmethod
90
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
91
- from ..models.url_copy_request_headers_type_0 import URLCopyRequestHeadersType0
92
-
93
- d = dict(src_dict)
94
- table_name = d.pop("table_name")
95
-
96
- url = d.pop("url")
97
-
98
- file_format = URLCopyRequestFileFormat(d.pop("file_format"))
99
-
100
- ignore_errors = d.pop("ignore_errors", UNSET)
101
-
102
- extended_timeout = d.pop("extended_timeout", UNSET)
103
-
104
- validate_schema = d.pop("validate_schema", UNSET)
105
-
106
- source_type = cast(Union[Literal["url"], Unset], d.pop("source_type", UNSET))
107
- if source_type != "url" and not isinstance(source_type, Unset):
108
- raise ValueError(f"source_type must match const 'url', got '{source_type}'")
109
-
110
- def _parse_headers(
111
- data: object,
112
- ) -> Union["URLCopyRequestHeadersType0", None, Unset]:
113
- if data is None:
114
- return data
115
- if isinstance(data, Unset):
116
- return data
117
- try:
118
- if not isinstance(data, dict):
119
- raise TypeError()
120
- headers_type_0 = URLCopyRequestHeadersType0.from_dict(data)
121
-
122
- return headers_type_0
123
- except: # noqa: E722
124
- pass
125
- return cast(Union["URLCopyRequestHeadersType0", None, Unset], data)
126
-
127
- headers = _parse_headers(d.pop("headers", UNSET))
128
-
129
- url_copy_request = cls(
130
- table_name=table_name,
131
- url=url,
132
- file_format=file_format,
133
- ignore_errors=ignore_errors,
134
- extended_timeout=extended_timeout,
135
- validate_schema=validate_schema,
136
- source_type=source_type,
137
- headers=headers,
138
- )
139
-
140
- url_copy_request.additional_properties = d
141
- return url_copy_request
142
-
143
- @property
144
- def additional_keys(self) -> list[str]:
145
- return list(self.additional_properties.keys())
146
-
147
- def __getitem__(self, key: str) -> Any:
148
- return self.additional_properties[key]
149
-
150
- def __setitem__(self, key: str, value: Any) -> None:
151
- self.additional_properties[key] = value
152
-
153
- def __delitem__(self, key: str) -> None:
154
- del self.additional_properties[key]
155
-
156
- def __contains__(self, key: str) -> bool:
157
- return key in self.additional_properties
@@ -1,10 +0,0 @@
1
- from enum import Enum
2
-
3
-
4
- class URLCopyRequestFileFormat(str, Enum):
5
- CSV = "csv"
6
- JSON = "json"
7
- PARQUET = "parquet"
8
-
9
- def __str__(self) -> str:
10
- return str(self.value)
@@ -1,44 +0,0 @@
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="URLCopyRequestHeadersType0")
8
-
9
-
10
- @_attrs_define
11
- class URLCopyRequestHeadersType0:
12
- """ """
13
-
14
- additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
15
-
16
- def to_dict(self) -> dict[str, Any]:
17
- field_dict: dict[str, Any] = {}
18
- field_dict.update(self.additional_properties)
19
-
20
- return field_dict
21
-
22
- @classmethod
23
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
- d = dict(src_dict)
25
- url_copy_request_headers_type_0 = cls()
26
-
27
- url_copy_request_headers_type_0.additional_properties = d
28
- return url_copy_request_headers_type_0
29
-
30
- @property
31
- def additional_keys(self) -> list[str]:
32
- return list(self.additional_properties.keys())
33
-
34
- def __getitem__(self, key: str) -> str:
35
- return self.additional_properties[key]
36
-
37
- def __setitem__(self, key: str, value: str) -> None:
38
- self.additional_properties[key] = value
39
-
40
- def __delitem__(self, key: str) -> None:
41
- del self.additional_properties[key]
42
-
43
- def __contains__(self, key: str) -> bool:
44
- return key in self.additional_properties
File without changes
File without changes