robosystems-client 0.2.2__py3-none-any.whl → 0.2.4__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.
- robosystems_client/api/agent/auto_select_agent.py +1 -41
- robosystems_client/api/agent/batch_process_queries.py +1 -41
- robosystems_client/api/agent/execute_specific_agent.py +1 -41
- robosystems_client/api/agent/get_agent_metadata.py +5 -49
- robosystems_client/api/agent/list_agents.py +4 -42
- robosystems_client/api/agent/recommend_agent.py +5 -45
- robosystems_client/api/auth/generate_sso_token.py +0 -18
- robosystems_client/api/auth/get_current_auth_user.py +14 -74
- robosystems_client/api/auth/logout_user.py +14 -50
- robosystems_client/api/auth/refresh_auth_session.py +14 -50
- robosystems_client/api/auth/resend_verification_email.py +14 -74
- robosystems_client/api/backup/create_backup.py +5 -45
- robosystems_client/api/backup/get_backup_download_url.py +4 -42
- robosystems_client/api/backup/get_backup_stats.py +5 -49
- robosystems_client/api/backup/list_backups.py +4 -42
- robosystems_client/api/backup/restore_backup.py +5 -45
- robosystems_client/api/connections/create_connection.py +5 -45
- robosystems_client/api/connections/create_link_token.py +5 -45
- robosystems_client/api/connections/delete_connection.py +5 -49
- robosystems_client/api/connections/exchange_link_token.py +5 -45
- robosystems_client/api/connections/get_connection.py +5 -49
- robosystems_client/api/connections/get_connection_options.py +5 -49
- robosystems_client/api/connections/init_o_auth.py +5 -45
- robosystems_client/api/connections/list_connections.py +4 -42
- robosystems_client/api/connections/oauth_callback.py +5 -45
- robosystems_client/api/connections/sync_connection.py +5 -45
- robosystems_client/api/graph_analytics/get_graph_metrics.py +5 -49
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +4 -42
- robosystems_client/api/graph_billing/get_current_graph_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_billing_history.py +4 -42
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_usage_details.py +4 -42
- robosystems_client/api/graph_credits/check_credit_balance.py +0 -38
- robosystems_client/api/graph_credits/check_storage_limits.py +1 -45
- robosystems_client/api/graph_credits/get_credit_summary.py +1 -45
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -38
- robosystems_client/api/graph_credits/list_credit_transactions.py +4 -42
- robosystems_client/api/graph_health/get_database_health.py +5 -49
- robosystems_client/api/graph_info/get_database_info.py +5 -49
- robosystems_client/api/graph_limits/get_graph_limits.py +5 -49
- robosystems_client/api/graphs/create_graph.py +21 -57
- robosystems_client/api/graphs/get_available_extensions.py +131 -15
- robosystems_client/api/graphs/get_graphs.py +154 -79
- robosystems_client/api/graphs/select_graph.py +117 -49
- robosystems_client/api/mcp/call_mcp_tool.py +24 -47
- robosystems_client/api/mcp/list_mcp_tools.py +13 -61
- robosystems_client/api/operations/cancel_operation.py +1 -45
- robosystems_client/api/operations/get_operation_status.py +1 -45
- robosystems_client/api/query/execute_cypher_query.py +68 -57
- robosystems_client/api/schema/export_graph_schema.py +223 -65
- robosystems_client/api/schema/get_graph_schema.py +137 -79
- robosystems_client/api/schema/validate_schema.py +5 -45
- robosystems_client/api/subgraphs/create_subgraph.py +5 -45
- robosystems_client/api/subgraphs/delete_subgraph.py +5 -45
- robosystems_client/api/subgraphs/get_subgraph_info.py +5 -49
- robosystems_client/api/subgraphs/get_subgraph_quota.py +5 -49
- robosystems_client/api/subgraphs/list_subgraphs.py +5 -49
- robosystems_client/api/tables/delete_file.py +317 -0
- robosystems_client/api/tables/get_file_info.py +249 -0
- robosystems_client/api/tables/get_upload_url.py +352 -0
- robosystems_client/api/tables/ingest_tables.py +428 -0
- robosystems_client/api/tables/list_table_files.py +329 -0
- robosystems_client/api/tables/list_tables.py +316 -0
- robosystems_client/api/tables/query_tables.py +431 -0
- robosystems_client/api/tables/update_file_status.py +395 -0
- robosystems_client/api/user/create_user_api_key.py +1 -41
- robosystems_client/api/user/get_all_credit_summaries.py +14 -111
- robosystems_client/api/user/get_current_user.py +14 -75
- robosystems_client/api/user/list_user_api_keys.py +14 -75
- robosystems_client/api/user/revoke_user_api_key.py +1 -45
- robosystems_client/api/user/update_user.py +1 -41
- robosystems_client/api/user/update_user_api_key.py +1 -41
- robosystems_client/api/user/update_user_password.py +1 -41
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -38
- robosystems_client/api/user_analytics/get_user_usage_overview.py +14 -75
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +14 -105
- robosystems_client/api/user_limits/get_shared_repository_limits.py +1 -45
- robosystems_client/api/user_limits/get_user_limits.py +14 -75
- robosystems_client/api/user_limits/get_user_usage.py +14 -75
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +1 -45
- robosystems_client/api/user_subscriptions/get_repository_credits.py +1 -45
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +14 -75
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -38
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +1 -41
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +1 -41
- robosystems_client/extensions/__init__.py +8 -1
- robosystems_client/extensions/auth_integration.py +1 -2
- robosystems_client/extensions/graph_client.py +5 -0
- robosystems_client/extensions/query_client.py +3 -2
- robosystems_client/extensions/sse_client.py +1 -1
- robosystems_client/extensions/table_ingest_client.py +36 -40
- robosystems_client/extensions/utils.py +2 -2
- robosystems_client/models/__init__.py +17 -21
- robosystems_client/models/create_graph_request.py +15 -3
- robosystems_client/models/cypher_query_request.py +5 -22
- robosystems_client/models/{delete_file_v1_graphs_graph_id_tables_files_file_id_delete_response_delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py → delete_file_response.py} +45 -9
- robosystems_client/models/file_info.py +169 -0
- robosystems_client/models/file_status_update.py +41 -0
- robosystems_client/models/get_file_info_response.py +205 -0
- robosystems_client/models/list_table_files_response.py +105 -0
- robosystems_client/models/schema_export_response.py +4 -2
- robosystems_client/models/schema_info_response.py +77 -0
- robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
- robosystems_client/models/schema_validation_response.py +7 -6
- robosystems_client/models/table_query_request.py +37 -2
- robosystems_client/models/{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 → update_file_status_response_updatefilestatus.py} +5 -8
- {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
- {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +110 -108
- robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +0 -287
- robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +0 -283
- robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +0 -260
- robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +0 -251
- robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +0 -283
- robosystems_client/api/tables/list_tables_v1_graphs_graph_id_tables_get.py +0 -224
- robosystems_client/api/tables/query_tables_v1_graphs_graph_id_tables_query_post.py +0 -247
- robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +0 -306
- robosystems_client/models/file_update_request.py +0 -62
- 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 +0 -47
- robosystems_client/models/update_file_v1_graphs_graph_id_tables_files_file_id_patch_response_update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +0 -47
- {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,20 +11,20 @@ import json
|
|
|
11
11
|
import logging
|
|
12
12
|
import httpx
|
|
13
13
|
|
|
14
|
-
from ..api.tables.
|
|
14
|
+
from ..api.tables.get_upload_url import (
|
|
15
15
|
sync_detailed as get_upload_url,
|
|
16
16
|
)
|
|
17
|
-
from ..api.tables.
|
|
18
|
-
sync_detailed as
|
|
17
|
+
from ..api.tables.update_file_status import (
|
|
18
|
+
sync_detailed as update_file_status,
|
|
19
19
|
)
|
|
20
|
-
from ..api.tables.
|
|
20
|
+
from ..api.tables.list_tables import (
|
|
21
21
|
sync_detailed as list_tables,
|
|
22
22
|
)
|
|
23
|
-
from ..api.tables.
|
|
23
|
+
from ..api.tables.ingest_tables import (
|
|
24
24
|
sync_detailed as ingest_tables,
|
|
25
25
|
)
|
|
26
26
|
from ..models.file_upload_request import FileUploadRequest
|
|
27
|
-
from ..models.
|
|
27
|
+
from ..models.file_status_update import FileStatusUpdate
|
|
28
28
|
from ..models.bulk_ingest_request import BulkIngestRequest
|
|
29
29
|
|
|
30
30
|
logger = logging.getLogger(__name__)
|
|
@@ -95,7 +95,7 @@ class TableIngestClient:
|
|
|
95
95
|
This method handles the complete 3-step upload process:
|
|
96
96
|
1. Get presigned upload URL
|
|
97
97
|
2. Upload file to S3
|
|
98
|
-
3.
|
|
98
|
+
3. Mark file as 'uploaded' (backend validates, calculates size/row count)
|
|
99
99
|
|
|
100
100
|
Args:
|
|
101
101
|
graph_id: The graph ID
|
|
@@ -104,7 +104,7 @@ class TableIngestClient:
|
|
|
104
104
|
options: Upload options
|
|
105
105
|
|
|
106
106
|
Returns:
|
|
107
|
-
UploadResult with upload details
|
|
107
|
+
UploadResult with upload details (size/row count calculated by backend)
|
|
108
108
|
"""
|
|
109
109
|
if options is None:
|
|
110
110
|
options = UploadOptions()
|
|
@@ -114,6 +114,9 @@ class TableIngestClient:
|
|
|
114
114
|
file_or_buffer, "read"
|
|
115
115
|
)
|
|
116
116
|
|
|
117
|
+
# Initialize file_path for type checking
|
|
118
|
+
file_path: Optional[Path] = None
|
|
119
|
+
|
|
117
120
|
if is_buffer:
|
|
118
121
|
# Handle buffer upload
|
|
119
122
|
file_name = options.file_name or "data.parquet"
|
|
@@ -216,12 +219,12 @@ class TableIngestClient:
|
|
|
216
219
|
# BinaryIO or file-like object
|
|
217
220
|
file_or_buffer.seek(0)
|
|
218
221
|
file_content = file_or_buffer.read()
|
|
219
|
-
file_size = len(file_content)
|
|
220
222
|
else:
|
|
221
223
|
# Read from file path
|
|
224
|
+
if file_path is None:
|
|
225
|
+
raise ValueError("file_path should not be None when not using buffer")
|
|
222
226
|
with open(file_path, "rb") as f:
|
|
223
227
|
file_content = f.read()
|
|
224
|
-
file_size = len(file_content)
|
|
225
228
|
|
|
226
229
|
s3_response = self._http_client.put(
|
|
227
230
|
upload_url,
|
|
@@ -230,54 +233,47 @@ class TableIngestClient:
|
|
|
230
233
|
)
|
|
231
234
|
s3_response.raise_for_status()
|
|
232
235
|
|
|
233
|
-
# Step 3:
|
|
236
|
+
# Step 3: Mark file as uploaded (backend validates and calculates size/row count)
|
|
234
237
|
if options.on_progress:
|
|
235
|
-
options.on_progress(f"
|
|
236
|
-
|
|
237
|
-
try:
|
|
238
|
-
import pyarrow.parquet as pq
|
|
239
|
-
|
|
240
|
-
if is_buffer:
|
|
241
|
-
# Read from buffer for row count
|
|
242
|
-
if hasattr(file_or_buffer, "seek"):
|
|
243
|
-
file_or_buffer.seek(0)
|
|
244
|
-
parquet_table = pq.read_table(file_or_buffer)
|
|
245
|
-
else:
|
|
246
|
-
# Read from file path
|
|
247
|
-
parquet_table = pq.read_table(file_path)
|
|
238
|
+
options.on_progress(f"Marking {file_name} as uploaded...")
|
|
248
239
|
|
|
249
|
-
|
|
250
|
-
except ImportError:
|
|
251
|
-
logger.warning(
|
|
252
|
-
"pyarrow not installed, row count will be estimated from file size"
|
|
253
|
-
)
|
|
254
|
-
# Rough estimate: ~100 bytes per row for typical data
|
|
255
|
-
row_count = file_size // 100
|
|
256
|
-
|
|
257
|
-
metadata_update = FileUpdateRequest(
|
|
258
|
-
file_size_bytes=file_size, row_count=row_count
|
|
259
|
-
)
|
|
240
|
+
status_update = FileStatusUpdate(status="uploaded")
|
|
260
241
|
|
|
261
242
|
kwargs = {
|
|
262
243
|
"graph_id": graph_id,
|
|
263
244
|
"file_id": file_id,
|
|
264
245
|
"client": client,
|
|
265
|
-
"body":
|
|
246
|
+
"body": status_update,
|
|
266
247
|
}
|
|
267
248
|
|
|
268
|
-
update_response =
|
|
249
|
+
update_response = update_file_status(**kwargs)
|
|
269
250
|
|
|
270
251
|
if not update_response.parsed:
|
|
252
|
+
logger.error(
|
|
253
|
+
f"No parsed response from update_file_status. Status code: {update_response.status_code}"
|
|
254
|
+
)
|
|
271
255
|
return UploadResult(
|
|
272
256
|
file_id=file_id,
|
|
273
|
-
file_size=
|
|
274
|
-
row_count=
|
|
257
|
+
file_size=0,
|
|
258
|
+
row_count=0,
|
|
275
259
|
table_name=table_name,
|
|
276
260
|
file_name=file_name,
|
|
277
261
|
success=False,
|
|
278
|
-
error="Failed to
|
|
262
|
+
error="Failed to complete file upload",
|
|
279
263
|
)
|
|
280
264
|
|
|
265
|
+
response_data = update_response.parsed
|
|
266
|
+
|
|
267
|
+
if isinstance(response_data, dict):
|
|
268
|
+
file_size = response_data.get("file_size_bytes", 0)
|
|
269
|
+
row_count = response_data.get("row_count", 0)
|
|
270
|
+
elif hasattr(response_data, "additional_properties"):
|
|
271
|
+
file_size = response_data.additional_properties.get("file_size_bytes", 0)
|
|
272
|
+
row_count = response_data.additional_properties.get("row_count", 0)
|
|
273
|
+
else:
|
|
274
|
+
file_size = getattr(response_data, "file_size_bytes", 0)
|
|
275
|
+
row_count = getattr(response_data, "row_count", 0)
|
|
276
|
+
|
|
281
277
|
if options.on_progress:
|
|
282
278
|
options.on_progress(
|
|
283
279
|
f"✅ Uploaded {file_name} ({file_size:,} bytes, {row_count:,} rows)"
|
|
@@ -144,7 +144,7 @@ class ResultProcessor:
|
|
|
144
144
|
writer.writerow(headers)
|
|
145
145
|
|
|
146
146
|
for row in data:
|
|
147
|
-
if isinstance(row, dict):
|
|
147
|
+
if isinstance(row, dict) and headers:
|
|
148
148
|
writer.writerow([row.get(h, "") for h in headers])
|
|
149
149
|
elif isinstance(row, (list, tuple)):
|
|
150
150
|
writer.writerow(row)
|
|
@@ -159,7 +159,7 @@ class ResultProcessor:
|
|
|
159
159
|
writer.writerow(headers)
|
|
160
160
|
|
|
161
161
|
for row in data:
|
|
162
|
-
if isinstance(row, dict):
|
|
162
|
+
if isinstance(row, dict) and headers:
|
|
163
163
|
writer.writerow([row.get(h, "") for h in headers])
|
|
164
164
|
elif isinstance(row, (list, tuple)):
|
|
165
165
|
writer.writerow(row)
|
|
@@ -75,9 +75,7 @@ from .cypher_query_request import CypherQueryRequest
|
|
|
75
75
|
from .cypher_query_request_parameters_type_0 import CypherQueryRequestParametersType0
|
|
76
76
|
from .database_health_response import DatabaseHealthResponse
|
|
77
77
|
from .database_info_response import DatabaseInfoResponse
|
|
78
|
-
from .
|
|
79
|
-
DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteResponseDeleteFileV1GraphsGraphIdTablesFilesFileIdDelete,
|
|
80
|
-
)
|
|
78
|
+
from .delete_file_response import DeleteFileResponse
|
|
81
79
|
from .delete_subgraph_request import DeleteSubgraphRequest
|
|
82
80
|
from .delete_subgraph_response import DeleteSubgraphResponse
|
|
83
81
|
from .detailed_transactions_response import DetailedTransactionsResponse
|
|
@@ -93,7 +91,8 @@ from .enhanced_credit_transaction_response_metadata import (
|
|
|
93
91
|
from .error_response import ErrorResponse
|
|
94
92
|
from .exchange_token_request import ExchangeTokenRequest
|
|
95
93
|
from .exchange_token_request_metadata_type_0 import ExchangeTokenRequestMetadataType0
|
|
96
|
-
from .
|
|
94
|
+
from .file_info import FileInfo
|
|
95
|
+
from .file_status_update import FileStatusUpdate
|
|
97
96
|
from .file_upload_request import FileUploadRequest
|
|
98
97
|
from .file_upload_response import FileUploadResponse
|
|
99
98
|
from .forgot_password_request import ForgotPasswordRequest
|
|
@@ -115,9 +114,7 @@ from .get_current_auth_user_response_getcurrentauthuser import (
|
|
|
115
114
|
from .get_current_graph_bill_response_getcurrentgraphbill import (
|
|
116
115
|
GetCurrentGraphBillResponseGetcurrentgraphbill,
|
|
117
116
|
)
|
|
118
|
-
from .
|
|
119
|
-
GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
|
|
120
|
-
)
|
|
117
|
+
from .get_file_info_response import GetFileInfoResponse
|
|
121
118
|
from .get_graph_billing_history_response_getgraphbillinghistory import (
|
|
122
119
|
GetGraphBillingHistoryResponseGetgraphbillinghistory,
|
|
123
120
|
)
|
|
@@ -127,9 +124,6 @@ from .get_graph_limits_response_getgraphlimits import (
|
|
|
127
124
|
from .get_graph_monthly_bill_response_getgraphmonthlybill import (
|
|
128
125
|
GetGraphMonthlyBillResponseGetgraphmonthlybill,
|
|
129
126
|
)
|
|
130
|
-
from .get_graph_schema_response_getgraphschema import (
|
|
131
|
-
GetGraphSchemaResponseGetgraphschema,
|
|
132
|
-
)
|
|
133
127
|
from .get_graph_usage_details_response_getgraphusagedetails import (
|
|
134
128
|
GetGraphUsageDetailsResponseGetgraphusagedetails,
|
|
135
129
|
)
|
|
@@ -164,9 +158,7 @@ from .link_token_request_options_type_0 import LinkTokenRequestOptionsType0
|
|
|
164
158
|
from .link_token_request_provider_type_0 import LinkTokenRequestProviderType0
|
|
165
159
|
from .list_connections_provider_type_0 import ListConnectionsProviderType0
|
|
166
160
|
from .list_subgraphs_response import ListSubgraphsResponse
|
|
167
|
-
from .
|
|
168
|
-
ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
|
|
169
|
-
)
|
|
161
|
+
from .list_table_files_response import ListTableFilesResponse
|
|
170
162
|
from .login_request import LoginRequest
|
|
171
163
|
from .logout_user_response_logoutuser import LogoutUserResponseLogoutuser
|
|
172
164
|
from .mcp_tool_call import MCPToolCall
|
|
@@ -207,6 +199,8 @@ from .schema_export_response_data_stats_type_0 import SchemaExportResponseDataSt
|
|
|
207
199
|
from .schema_export_response_schema_definition_type_0 import (
|
|
208
200
|
SchemaExportResponseSchemaDefinitionType0,
|
|
209
201
|
)
|
|
202
|
+
from .schema_info_response import SchemaInfoResponse
|
|
203
|
+
from .schema_info_response_schema import SchemaInfoResponseSchema
|
|
210
204
|
from .schema_validation_request import SchemaValidationRequest
|
|
211
205
|
from .schema_validation_request_schema_definition_type_0 import (
|
|
212
206
|
SchemaValidationRequestSchemaDefinitionType0,
|
|
@@ -249,8 +243,8 @@ from .table_query_response import TableQueryResponse
|
|
|
249
243
|
from .tier_upgrade_request import TierUpgradeRequest
|
|
250
244
|
from .transaction_summary_response import TransactionSummaryResponse
|
|
251
245
|
from .update_api_key_request import UpdateAPIKeyRequest
|
|
252
|
-
from .
|
|
253
|
-
|
|
246
|
+
from .update_file_status_response_updatefilestatus import (
|
|
247
|
+
UpdateFileStatusResponseUpdatefilestatus,
|
|
254
248
|
)
|
|
255
249
|
from .update_password_request import UpdatePasswordRequest
|
|
256
250
|
from .update_user_request import UpdateUserRequest
|
|
@@ -339,7 +333,7 @@ __all__ = (
|
|
|
339
333
|
"CypherQueryRequestParametersType0",
|
|
340
334
|
"DatabaseHealthResponse",
|
|
341
335
|
"DatabaseInfoResponse",
|
|
342
|
-
"
|
|
336
|
+
"DeleteFileResponse",
|
|
343
337
|
"DeleteSubgraphRequest",
|
|
344
338
|
"DeleteSubgraphResponse",
|
|
345
339
|
"DetailedTransactionsResponse",
|
|
@@ -351,7 +345,8 @@ __all__ = (
|
|
|
351
345
|
"ErrorResponse",
|
|
352
346
|
"ExchangeTokenRequest",
|
|
353
347
|
"ExchangeTokenRequestMetadataType0",
|
|
354
|
-
"
|
|
348
|
+
"FileInfo",
|
|
349
|
+
"FileStatusUpdate",
|
|
355
350
|
"FileUploadRequest",
|
|
356
351
|
"FileUploadResponse",
|
|
357
352
|
"ForgotPasswordRequest",
|
|
@@ -361,11 +356,10 @@ __all__ = (
|
|
|
361
356
|
"GetBackupDownloadUrlResponseGetbackupdownloadurl",
|
|
362
357
|
"GetCurrentAuthUserResponseGetcurrentauthuser",
|
|
363
358
|
"GetCurrentGraphBillResponseGetcurrentgraphbill",
|
|
364
|
-
"
|
|
359
|
+
"GetFileInfoResponse",
|
|
365
360
|
"GetGraphBillingHistoryResponseGetgraphbillinghistory",
|
|
366
361
|
"GetGraphLimitsResponseGetgraphlimits",
|
|
367
362
|
"GetGraphMonthlyBillResponseGetgraphmonthlybill",
|
|
368
|
-
"GetGraphSchemaResponseGetgraphschema",
|
|
369
363
|
"GetGraphUsageDetailsResponseGetgraphusagedetails",
|
|
370
364
|
"GetOperationStatusResponseGetoperationstatus",
|
|
371
365
|
"GetSharedRepositoryLimitsResponseGetsharedrepositorylimits",
|
|
@@ -390,7 +384,7 @@ __all__ = (
|
|
|
390
384
|
"LinkTokenRequestProviderType0",
|
|
391
385
|
"ListConnectionsProviderType0",
|
|
392
386
|
"ListSubgraphsResponse",
|
|
393
|
-
"
|
|
387
|
+
"ListTableFilesResponse",
|
|
394
388
|
"LoginRequest",
|
|
395
389
|
"LogoutUserResponseLogoutuser",
|
|
396
390
|
"MCPToolCall",
|
|
@@ -421,6 +415,8 @@ __all__ = (
|
|
|
421
415
|
"SchemaExportResponse",
|
|
422
416
|
"SchemaExportResponseDataStatsType0",
|
|
423
417
|
"SchemaExportResponseSchemaDefinitionType0",
|
|
418
|
+
"SchemaInfoResponse",
|
|
419
|
+
"SchemaInfoResponseSchema",
|
|
424
420
|
"SchemaValidationRequest",
|
|
425
421
|
"SchemaValidationRequestSchemaDefinitionType0",
|
|
426
422
|
"SchemaValidationResponse",
|
|
@@ -455,7 +451,7 @@ __all__ = (
|
|
|
455
451
|
"TierUpgradeRequest",
|
|
456
452
|
"TransactionSummaryResponse",
|
|
457
453
|
"UpdateAPIKeyRequest",
|
|
458
|
-
"
|
|
454
|
+
"UpdateFileStatusResponseUpdatefilestatus",
|
|
459
455
|
"UpdatePasswordRequest",
|
|
460
456
|
"UpdateUserRequest",
|
|
461
457
|
"UserAnalyticsResponse",
|
|
@@ -20,9 +20,10 @@ class CreateGraphRequest:
|
|
|
20
20
|
"""Request model for creating a new graph.
|
|
21
21
|
|
|
22
22
|
Example:
|
|
23
|
-
{'initial_entity': {'cik': '0001234567', 'name': 'Acme
|
|
24
|
-
'kuzu-standard', 'metadata': {'description': '
|
|
25
|
-
'
|
|
23
|
+
{'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': 'https://acmeconsulting.com'},
|
|
24
|
+
'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Professional consulting services with full
|
|
25
|
+
accounting integration', 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags':
|
|
26
|
+
['consulting', 'professional-services']}
|
|
26
27
|
|
|
27
28
|
Attributes:
|
|
28
29
|
metadata (GraphMetadata): Metadata for graph creation.
|
|
@@ -31,6 +32,9 @@ class CreateGraphRequest:
|
|
|
31
32
|
custom_schema (Union['CustomSchemaDefinition', None, Unset]): Custom schema definition to apply
|
|
32
33
|
initial_entity (Union['InitialEntityData', None, Unset]): Optional initial entity to create in the graph. If
|
|
33
34
|
provided, creates a entity-focused graph.
|
|
35
|
+
create_entity (Union[Unset, bool]): Whether to create the entity node and upload initial data. Only applies when
|
|
36
|
+
initial_entity is provided. Set to False to create graph without populating entity data (useful for file-based
|
|
37
|
+
ingestion workflows). Default: True.
|
|
34
38
|
tags (Union[Unset, list[str]]): Optional tags for organization
|
|
35
39
|
"""
|
|
36
40
|
|
|
@@ -38,6 +42,7 @@ class CreateGraphRequest:
|
|
|
38
42
|
instance_tier: Union[Unset, str] = "kuzu-standard"
|
|
39
43
|
custom_schema: Union["CustomSchemaDefinition", None, Unset] = UNSET
|
|
40
44
|
initial_entity: Union["InitialEntityData", None, Unset] = UNSET
|
|
45
|
+
create_entity: Union[Unset, bool] = True
|
|
41
46
|
tags: Union[Unset, list[str]] = UNSET
|
|
42
47
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
48
|
|
|
@@ -65,6 +70,8 @@ class CreateGraphRequest:
|
|
|
65
70
|
else:
|
|
66
71
|
initial_entity = self.initial_entity
|
|
67
72
|
|
|
73
|
+
create_entity = self.create_entity
|
|
74
|
+
|
|
68
75
|
tags: Union[Unset, list[str]] = UNSET
|
|
69
76
|
if not isinstance(self.tags, Unset):
|
|
70
77
|
tags = self.tags
|
|
@@ -82,6 +89,8 @@ class CreateGraphRequest:
|
|
|
82
89
|
field_dict["custom_schema"] = custom_schema
|
|
83
90
|
if initial_entity is not UNSET:
|
|
84
91
|
field_dict["initial_entity"] = initial_entity
|
|
92
|
+
if create_entity is not UNSET:
|
|
93
|
+
field_dict["create_entity"] = create_entity
|
|
85
94
|
if tags is not UNSET:
|
|
86
95
|
field_dict["tags"] = tags
|
|
87
96
|
|
|
@@ -134,6 +143,8 @@ class CreateGraphRequest:
|
|
|
134
143
|
|
|
135
144
|
initial_entity = _parse_initial_entity(d.pop("initial_entity", UNSET))
|
|
136
145
|
|
|
146
|
+
create_entity = d.pop("create_entity", UNSET)
|
|
147
|
+
|
|
137
148
|
tags = cast(list[str], d.pop("tags", UNSET))
|
|
138
149
|
|
|
139
150
|
create_graph_request = cls(
|
|
@@ -141,6 +152,7 @@ class CreateGraphRequest:
|
|
|
141
152
|
instance_tier=instance_tier,
|
|
142
153
|
custom_schema=custom_schema,
|
|
143
154
|
initial_entity=initial_entity,
|
|
155
|
+
create_entity=create_entity,
|
|
144
156
|
tags=tags,
|
|
145
157
|
)
|
|
146
158
|
|
|
@@ -2,7 +2,6 @@ from collections.abc import Mapping
|
|
|
2
2
|
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
5
|
|
|
7
6
|
from ..types import UNSET, Unset
|
|
8
7
|
|
|
@@ -20,15 +19,16 @@ class CypherQueryRequest:
|
|
|
20
19
|
"""Request model for Cypher query execution.
|
|
21
20
|
|
|
22
21
|
Attributes:
|
|
23
|
-
query (str): The Cypher query to execute
|
|
24
|
-
|
|
22
|
+
query (str): The Cypher query to execute. Use parameters ($param_name) for all dynamic values to prevent
|
|
23
|
+
injection attacks.
|
|
24
|
+
parameters (Union['CypherQueryRequestParametersType0', None, Unset]): Query parameters for safe value
|
|
25
|
+
substitution. ALWAYS use parameters instead of string interpolation.
|
|
25
26
|
timeout (Union[None, Unset, int]): Query timeout in seconds (1-300) Default: 60.
|
|
26
27
|
"""
|
|
27
28
|
|
|
28
29
|
query: str
|
|
29
30
|
parameters: Union["CypherQueryRequestParametersType0", None, Unset] = UNSET
|
|
30
31
|
timeout: Union[None, Unset, int] = 60
|
|
31
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
32
|
|
|
33
33
|
def to_dict(self) -> dict[str, Any]:
|
|
34
34
|
from ..models.cypher_query_request_parameters_type_0 import (
|
|
@@ -52,7 +52,7 @@ class CypherQueryRequest:
|
|
|
52
52
|
timeout = self.timeout
|
|
53
53
|
|
|
54
54
|
field_dict: dict[str, Any] = {}
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
field_dict.update(
|
|
57
57
|
{
|
|
58
58
|
"query": query,
|
|
@@ -108,21 +108,4 @@ class CypherQueryRequest:
|
|
|
108
108
|
timeout=timeout,
|
|
109
109
|
)
|
|
110
110
|
|
|
111
|
-
cypher_query_request.additional_properties = d
|
|
112
111
|
return cypher_query_request
|
|
113
|
-
|
|
114
|
-
@property
|
|
115
|
-
def additional_keys(self) -> list[str]:
|
|
116
|
-
return list(self.additional_properties.keys())
|
|
117
|
-
|
|
118
|
-
def __getitem__(self, key: str) -> Any:
|
|
119
|
-
return self.additional_properties[key]
|
|
120
|
-
|
|
121
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
122
|
-
self.additional_properties[key] = value
|
|
123
|
-
|
|
124
|
-
def __delitem__(self, key: str) -> None:
|
|
125
|
-
del self.additional_properties[key]
|
|
126
|
-
|
|
127
|
-
def __contains__(self, key: str) -> bool:
|
|
128
|
-
return key in self.additional_properties
|
|
@@ -4,31 +4,67 @@ 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(
|
|
8
|
-
"T",
|
|
9
|
-
bound="DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteResponseDeleteFileV1GraphsGraphIdTablesFilesFileIdDelete",
|
|
10
|
-
)
|
|
7
|
+
T = TypeVar("T", bound="DeleteFileResponse")
|
|
11
8
|
|
|
12
9
|
|
|
13
10
|
@_attrs_define
|
|
14
|
-
class
|
|
15
|
-
"""
|
|
11
|
+
class DeleteFileResponse:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
status (str): Deletion status
|
|
15
|
+
file_id (str): Deleted file ID
|
|
16
|
+
file_name (str): Deleted file name
|
|
17
|
+
message (str): Operation message
|
|
18
|
+
"""
|
|
16
19
|
|
|
20
|
+
status: str
|
|
21
|
+
file_id: str
|
|
22
|
+
file_name: str
|
|
23
|
+
message: str
|
|
17
24
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
18
25
|
|
|
19
26
|
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
status = self.status
|
|
28
|
+
|
|
29
|
+
file_id = self.file_id
|
|
30
|
+
|
|
31
|
+
file_name = self.file_name
|
|
32
|
+
|
|
33
|
+
message = self.message
|
|
34
|
+
|
|
20
35
|
field_dict: dict[str, Any] = {}
|
|
21
36
|
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"status": status,
|
|
40
|
+
"file_id": file_id,
|
|
41
|
+
"file_name": file_name,
|
|
42
|
+
"message": message,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
22
45
|
|
|
23
46
|
return field_dict
|
|
24
47
|
|
|
25
48
|
@classmethod
|
|
26
49
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
50
|
d = dict(src_dict)
|
|
28
|
-
|
|
51
|
+
status = d.pop("status")
|
|
52
|
+
|
|
53
|
+
file_id = d.pop("file_id")
|
|
54
|
+
|
|
55
|
+
file_name = d.pop("file_name")
|
|
56
|
+
|
|
57
|
+
message = d.pop("message")
|
|
58
|
+
|
|
59
|
+
delete_file_response = cls(
|
|
60
|
+
status=status,
|
|
61
|
+
file_id=file_id,
|
|
62
|
+
file_name=file_name,
|
|
63
|
+
message=message,
|
|
64
|
+
)
|
|
29
65
|
|
|
30
|
-
|
|
31
|
-
return
|
|
66
|
+
delete_file_response.additional_properties = d
|
|
67
|
+
return delete_file_response
|
|
32
68
|
|
|
33
69
|
@property
|
|
34
70
|
def additional_keys(self) -> list[str]:
|
|
@@ -0,0 +1,169 @@
|
|
|
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="FileInfo")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class FileInfo:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
file_id (str): Unique file identifier
|
|
17
|
+
file_name (str): Original file name
|
|
18
|
+
file_format (str): File format (parquet, csv, etc.)
|
|
19
|
+
size_bytes (int): File size in bytes
|
|
20
|
+
upload_status (str): Current upload status
|
|
21
|
+
upload_method (str): Upload method used
|
|
22
|
+
s3_key (str): S3 object key
|
|
23
|
+
row_count (Union[None, Unset, int]): Estimated row count
|
|
24
|
+
created_at (Union[None, Unset, str]): File creation timestamp
|
|
25
|
+
uploaded_at (Union[None, Unset, str]): File upload completion timestamp
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
file_id: str
|
|
29
|
+
file_name: str
|
|
30
|
+
file_format: str
|
|
31
|
+
size_bytes: int
|
|
32
|
+
upload_status: str
|
|
33
|
+
upload_method: str
|
|
34
|
+
s3_key: str
|
|
35
|
+
row_count: Union[None, Unset, int] = UNSET
|
|
36
|
+
created_at: Union[None, Unset, str] = UNSET
|
|
37
|
+
uploaded_at: Union[None, Unset, str] = UNSET
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
file_id = self.file_id
|
|
42
|
+
|
|
43
|
+
file_name = self.file_name
|
|
44
|
+
|
|
45
|
+
file_format = self.file_format
|
|
46
|
+
|
|
47
|
+
size_bytes = self.size_bytes
|
|
48
|
+
|
|
49
|
+
upload_status = self.upload_status
|
|
50
|
+
|
|
51
|
+
upload_method = self.upload_method
|
|
52
|
+
|
|
53
|
+
s3_key = self.s3_key
|
|
54
|
+
|
|
55
|
+
row_count: Union[None, Unset, int]
|
|
56
|
+
if isinstance(self.row_count, Unset):
|
|
57
|
+
row_count = UNSET
|
|
58
|
+
else:
|
|
59
|
+
row_count = self.row_count
|
|
60
|
+
|
|
61
|
+
created_at: Union[None, Unset, str]
|
|
62
|
+
if isinstance(self.created_at, Unset):
|
|
63
|
+
created_at = UNSET
|
|
64
|
+
else:
|
|
65
|
+
created_at = self.created_at
|
|
66
|
+
|
|
67
|
+
uploaded_at: Union[None, Unset, str]
|
|
68
|
+
if isinstance(self.uploaded_at, Unset):
|
|
69
|
+
uploaded_at = UNSET
|
|
70
|
+
else:
|
|
71
|
+
uploaded_at = self.uploaded_at
|
|
72
|
+
|
|
73
|
+
field_dict: dict[str, Any] = {}
|
|
74
|
+
field_dict.update(self.additional_properties)
|
|
75
|
+
field_dict.update(
|
|
76
|
+
{
|
|
77
|
+
"file_id": file_id,
|
|
78
|
+
"file_name": file_name,
|
|
79
|
+
"file_format": file_format,
|
|
80
|
+
"size_bytes": size_bytes,
|
|
81
|
+
"upload_status": upload_status,
|
|
82
|
+
"upload_method": upload_method,
|
|
83
|
+
"s3_key": s3_key,
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
if row_count is not UNSET:
|
|
87
|
+
field_dict["row_count"] = row_count
|
|
88
|
+
if created_at is not UNSET:
|
|
89
|
+
field_dict["created_at"] = created_at
|
|
90
|
+
if uploaded_at is not UNSET:
|
|
91
|
+
field_dict["uploaded_at"] = uploaded_at
|
|
92
|
+
|
|
93
|
+
return field_dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
file_id = d.pop("file_id")
|
|
99
|
+
|
|
100
|
+
file_name = d.pop("file_name")
|
|
101
|
+
|
|
102
|
+
file_format = d.pop("file_format")
|
|
103
|
+
|
|
104
|
+
size_bytes = d.pop("size_bytes")
|
|
105
|
+
|
|
106
|
+
upload_status = d.pop("upload_status")
|
|
107
|
+
|
|
108
|
+
upload_method = d.pop("upload_method")
|
|
109
|
+
|
|
110
|
+
s3_key = d.pop("s3_key")
|
|
111
|
+
|
|
112
|
+
def _parse_row_count(data: object) -> Union[None, Unset, int]:
|
|
113
|
+
if data is None:
|
|
114
|
+
return data
|
|
115
|
+
if isinstance(data, Unset):
|
|
116
|
+
return data
|
|
117
|
+
return cast(Union[None, Unset, int], data)
|
|
118
|
+
|
|
119
|
+
row_count = _parse_row_count(d.pop("row_count", UNSET))
|
|
120
|
+
|
|
121
|
+
def _parse_created_at(data: object) -> Union[None, Unset, str]:
|
|
122
|
+
if data is None:
|
|
123
|
+
return data
|
|
124
|
+
if isinstance(data, Unset):
|
|
125
|
+
return data
|
|
126
|
+
return cast(Union[None, Unset, str], data)
|
|
127
|
+
|
|
128
|
+
created_at = _parse_created_at(d.pop("created_at", UNSET))
|
|
129
|
+
|
|
130
|
+
def _parse_uploaded_at(data: object) -> Union[None, Unset, str]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
return cast(Union[None, Unset, str], data)
|
|
136
|
+
|
|
137
|
+
uploaded_at = _parse_uploaded_at(d.pop("uploaded_at", UNSET))
|
|
138
|
+
|
|
139
|
+
file_info = cls(
|
|
140
|
+
file_id=file_id,
|
|
141
|
+
file_name=file_name,
|
|
142
|
+
file_format=file_format,
|
|
143
|
+
size_bytes=size_bytes,
|
|
144
|
+
upload_status=upload_status,
|
|
145
|
+
upload_method=upload_method,
|
|
146
|
+
s3_key=s3_key,
|
|
147
|
+
row_count=row_count,
|
|
148
|
+
created_at=created_at,
|
|
149
|
+
uploaded_at=uploaded_at,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
file_info.additional_properties = d
|
|
153
|
+
return file_info
|
|
154
|
+
|
|
155
|
+
@property
|
|
156
|
+
def additional_keys(self) -> list[str]:
|
|
157
|
+
return list(self.additional_properties.keys())
|
|
158
|
+
|
|
159
|
+
def __getitem__(self, key: str) -> Any:
|
|
160
|
+
return self.additional_properties[key]
|
|
161
|
+
|
|
162
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
163
|
+
self.additional_properties[key] = value
|
|
164
|
+
|
|
165
|
+
def __delitem__(self, key: str) -> None:
|
|
166
|
+
del self.additional_properties[key]
|
|
167
|
+
|
|
168
|
+
def __contains__(self, key: str) -> bool:
|
|
169
|
+
return key in self.additional_properties
|