robosystems-client 0.2.2__py3-none-any.whl → 0.2.3__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/query/execute_cypher_query.py +0 -5
- robosystems_client/api/tables/delete_file.py +437 -0
- robosystems_client/api/tables/get_file_info.py +397 -0
- robosystems_client/api/tables/get_upload_url.py +548 -0
- robosystems_client/api/tables/ingest_tables.py +616 -0
- robosystems_client/api/tables/list_table_files.py +509 -0
- robosystems_client/api/tables/list_tables.py +488 -0
- robosystems_client/api/tables/query_tables.py +487 -0
- robosystems_client/api/tables/update_file_status.py +539 -0
- robosystems_client/extensions/graph_client.py +5 -0
- robosystems_client/extensions/table_ingest_client.py +31 -40
- robosystems_client/models/__init__.py +13 -17
- robosystems_client/models/create_graph_request.py +11 -0
- 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/{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.3.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.3.dist-info}/RECORD +23 -22
- 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.3.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error_response import ErrorResponse
|
|
9
|
+
from ...models.get_file_info_response import GetFileInfoResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
graph_id: str,
|
|
16
|
+
file_id: str,
|
|
17
|
+
*,
|
|
18
|
+
token: Union[None, Unset, str] = UNSET,
|
|
19
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
headers: dict[str, Any] = {}
|
|
22
|
+
if not isinstance(authorization, Unset):
|
|
23
|
+
headers["authorization"] = authorization
|
|
24
|
+
|
|
25
|
+
params: dict[str, Any] = {}
|
|
26
|
+
|
|
27
|
+
json_token: Union[None, Unset, str]
|
|
28
|
+
if isinstance(token, Unset):
|
|
29
|
+
json_token = UNSET
|
|
30
|
+
else:
|
|
31
|
+
json_token = token
|
|
32
|
+
params["token"] = json_token
|
|
33
|
+
|
|
34
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
35
|
+
|
|
36
|
+
_kwargs: dict[str, Any] = {
|
|
37
|
+
"method": "get",
|
|
38
|
+
"url": f"/v1/graphs/{graph_id}/tables/files/{file_id}",
|
|
39
|
+
"params": params,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
_kwargs["headers"] = headers
|
|
43
|
+
return _kwargs
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _parse_response(
|
|
47
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
48
|
+
) -> Optional[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]:
|
|
49
|
+
if response.status_code == 200:
|
|
50
|
+
response_200 = GetFileInfoResponse.from_dict(response.json())
|
|
51
|
+
|
|
52
|
+
return response_200
|
|
53
|
+
|
|
54
|
+
if response.status_code == 401:
|
|
55
|
+
response_401 = cast(Any, None)
|
|
56
|
+
return response_401
|
|
57
|
+
|
|
58
|
+
if response.status_code == 403:
|
|
59
|
+
response_403 = ErrorResponse.from_dict(response.json())
|
|
60
|
+
|
|
61
|
+
return response_403
|
|
62
|
+
|
|
63
|
+
if response.status_code == 404:
|
|
64
|
+
response_404 = ErrorResponse.from_dict(response.json())
|
|
65
|
+
|
|
66
|
+
return response_404
|
|
67
|
+
|
|
68
|
+
if response.status_code == 422:
|
|
69
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
70
|
+
|
|
71
|
+
return response_422
|
|
72
|
+
|
|
73
|
+
if client.raise_on_unexpected_status:
|
|
74
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
75
|
+
else:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _build_response(
|
|
80
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
81
|
+
) -> Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]:
|
|
82
|
+
return Response(
|
|
83
|
+
status_code=HTTPStatus(response.status_code),
|
|
84
|
+
content=response.content,
|
|
85
|
+
headers=response.headers,
|
|
86
|
+
parsed=_parse_response(client=client, response=response),
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def sync_detailed(
|
|
91
|
+
graph_id: str,
|
|
92
|
+
file_id: str,
|
|
93
|
+
*,
|
|
94
|
+
client: AuthenticatedClient,
|
|
95
|
+
token: Union[None, Unset, str] = UNSET,
|
|
96
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
97
|
+
) -> Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]:
|
|
98
|
+
r""" Get File Information
|
|
99
|
+
|
|
100
|
+
Get detailed information about a specific file.
|
|
101
|
+
|
|
102
|
+
**Purpose:**
|
|
103
|
+
Retrieve comprehensive metadata for a single file, including upload status,
|
|
104
|
+
size, row count, and timestamps. Useful for validating individual files
|
|
105
|
+
before ingestion.
|
|
106
|
+
|
|
107
|
+
**Use Cases:**
|
|
108
|
+
- Validate file upload completion
|
|
109
|
+
- Check file metadata before ingestion
|
|
110
|
+
- Debug upload issues
|
|
111
|
+
- Verify file format and size
|
|
112
|
+
- Track file lifecycle
|
|
113
|
+
|
|
114
|
+
**Example Response:**
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
\"file_id\": \"f123\",
|
|
118
|
+
\"graph_id\": \"kg123\",
|
|
119
|
+
\"table_id\": \"t456\",
|
|
120
|
+
\"table_name\": \"Entity\",
|
|
121
|
+
\"file_name\": \"entities_batch1.parquet\",
|
|
122
|
+
\"file_format\": \"parquet\",
|
|
123
|
+
\"size_bytes\": 1048576,
|
|
124
|
+
\"row_count\": 5000,
|
|
125
|
+
\"upload_status\": \"uploaded\",
|
|
126
|
+
\"upload_method\": \"presigned_url\",
|
|
127
|
+
\"created_at\": \"2025-10-28T10:00:00Z\",
|
|
128
|
+
\"uploaded_at\": \"2025-10-28T10:01:30Z\",
|
|
129
|
+
\"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\"
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Example Usage:**
|
|
134
|
+
```bash
|
|
135
|
+
curl -H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
136
|
+
https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Note:**
|
|
140
|
+
File info retrieval is included - no credit consumption.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
graph_id (str): Graph database identifier
|
|
144
|
+
file_id (str): File ID
|
|
145
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
146
|
+
authorization (Union[None, Unset, str]):
|
|
147
|
+
|
|
148
|
+
Raises:
|
|
149
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
150
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
kwargs = _get_kwargs(
|
|
157
|
+
graph_id=graph_id,
|
|
158
|
+
file_id=file_id,
|
|
159
|
+
token=token,
|
|
160
|
+
authorization=authorization,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
response = client.get_httpx_client().request(
|
|
164
|
+
**kwargs,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
return _build_response(client=client, response=response)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def sync(
|
|
171
|
+
graph_id: str,
|
|
172
|
+
file_id: str,
|
|
173
|
+
*,
|
|
174
|
+
client: AuthenticatedClient,
|
|
175
|
+
token: Union[None, Unset, str] = UNSET,
|
|
176
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
177
|
+
) -> Optional[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]:
|
|
178
|
+
r""" Get File Information
|
|
179
|
+
|
|
180
|
+
Get detailed information about a specific file.
|
|
181
|
+
|
|
182
|
+
**Purpose:**
|
|
183
|
+
Retrieve comprehensive metadata for a single file, including upload status,
|
|
184
|
+
size, row count, and timestamps. Useful for validating individual files
|
|
185
|
+
before ingestion.
|
|
186
|
+
|
|
187
|
+
**Use Cases:**
|
|
188
|
+
- Validate file upload completion
|
|
189
|
+
- Check file metadata before ingestion
|
|
190
|
+
- Debug upload issues
|
|
191
|
+
- Verify file format and size
|
|
192
|
+
- Track file lifecycle
|
|
193
|
+
|
|
194
|
+
**Example Response:**
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
\"file_id\": \"f123\",
|
|
198
|
+
\"graph_id\": \"kg123\",
|
|
199
|
+
\"table_id\": \"t456\",
|
|
200
|
+
\"table_name\": \"Entity\",
|
|
201
|
+
\"file_name\": \"entities_batch1.parquet\",
|
|
202
|
+
\"file_format\": \"parquet\",
|
|
203
|
+
\"size_bytes\": 1048576,
|
|
204
|
+
\"row_count\": 5000,
|
|
205
|
+
\"upload_status\": \"uploaded\",
|
|
206
|
+
\"upload_method\": \"presigned_url\",
|
|
207
|
+
\"created_at\": \"2025-10-28T10:00:00Z\",
|
|
208
|
+
\"uploaded_at\": \"2025-10-28T10:01:30Z\",
|
|
209
|
+
\"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\"
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Example Usage:**
|
|
214
|
+
```bash
|
|
215
|
+
curl -H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
216
|
+
https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Note:**
|
|
220
|
+
File info retrieval is included - no credit consumption.
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
graph_id (str): Graph database identifier
|
|
224
|
+
file_id (str): File ID
|
|
225
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
226
|
+
authorization (Union[None, Unset, str]):
|
|
227
|
+
|
|
228
|
+
Raises:
|
|
229
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
230
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
231
|
+
|
|
232
|
+
Returns:
|
|
233
|
+
Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]
|
|
234
|
+
"""
|
|
235
|
+
|
|
236
|
+
return sync_detailed(
|
|
237
|
+
graph_id=graph_id,
|
|
238
|
+
file_id=file_id,
|
|
239
|
+
client=client,
|
|
240
|
+
token=token,
|
|
241
|
+
authorization=authorization,
|
|
242
|
+
).parsed
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
async def asyncio_detailed(
|
|
246
|
+
graph_id: str,
|
|
247
|
+
file_id: str,
|
|
248
|
+
*,
|
|
249
|
+
client: AuthenticatedClient,
|
|
250
|
+
token: Union[None, Unset, str] = UNSET,
|
|
251
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
252
|
+
) -> Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]:
|
|
253
|
+
r""" Get File Information
|
|
254
|
+
|
|
255
|
+
Get detailed information about a specific file.
|
|
256
|
+
|
|
257
|
+
**Purpose:**
|
|
258
|
+
Retrieve comprehensive metadata for a single file, including upload status,
|
|
259
|
+
size, row count, and timestamps. Useful for validating individual files
|
|
260
|
+
before ingestion.
|
|
261
|
+
|
|
262
|
+
**Use Cases:**
|
|
263
|
+
- Validate file upload completion
|
|
264
|
+
- Check file metadata before ingestion
|
|
265
|
+
- Debug upload issues
|
|
266
|
+
- Verify file format and size
|
|
267
|
+
- Track file lifecycle
|
|
268
|
+
|
|
269
|
+
**Example Response:**
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
\"file_id\": \"f123\",
|
|
273
|
+
\"graph_id\": \"kg123\",
|
|
274
|
+
\"table_id\": \"t456\",
|
|
275
|
+
\"table_name\": \"Entity\",
|
|
276
|
+
\"file_name\": \"entities_batch1.parquet\",
|
|
277
|
+
\"file_format\": \"parquet\",
|
|
278
|
+
\"size_bytes\": 1048576,
|
|
279
|
+
\"row_count\": 5000,
|
|
280
|
+
\"upload_status\": \"uploaded\",
|
|
281
|
+
\"upload_method\": \"presigned_url\",
|
|
282
|
+
\"created_at\": \"2025-10-28T10:00:00Z\",
|
|
283
|
+
\"uploaded_at\": \"2025-10-28T10:01:30Z\",
|
|
284
|
+
\"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\"
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Example Usage:**
|
|
289
|
+
```bash
|
|
290
|
+
curl -H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
291
|
+
https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Note:**
|
|
295
|
+
File info retrieval is included - no credit consumption.
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
graph_id (str): Graph database identifier
|
|
299
|
+
file_id (str): File ID
|
|
300
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
301
|
+
authorization (Union[None, Unset, str]):
|
|
302
|
+
|
|
303
|
+
Raises:
|
|
304
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
305
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
306
|
+
|
|
307
|
+
Returns:
|
|
308
|
+
Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]
|
|
309
|
+
"""
|
|
310
|
+
|
|
311
|
+
kwargs = _get_kwargs(
|
|
312
|
+
graph_id=graph_id,
|
|
313
|
+
file_id=file_id,
|
|
314
|
+
token=token,
|
|
315
|
+
authorization=authorization,
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
319
|
+
|
|
320
|
+
return _build_response(client=client, response=response)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
async def asyncio(
|
|
324
|
+
graph_id: str,
|
|
325
|
+
file_id: str,
|
|
326
|
+
*,
|
|
327
|
+
client: AuthenticatedClient,
|
|
328
|
+
token: Union[None, Unset, str] = UNSET,
|
|
329
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
330
|
+
) -> Optional[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]:
|
|
331
|
+
r""" Get File Information
|
|
332
|
+
|
|
333
|
+
Get detailed information about a specific file.
|
|
334
|
+
|
|
335
|
+
**Purpose:**
|
|
336
|
+
Retrieve comprehensive metadata for a single file, including upload status,
|
|
337
|
+
size, row count, and timestamps. Useful for validating individual files
|
|
338
|
+
before ingestion.
|
|
339
|
+
|
|
340
|
+
**Use Cases:**
|
|
341
|
+
- Validate file upload completion
|
|
342
|
+
- Check file metadata before ingestion
|
|
343
|
+
- Debug upload issues
|
|
344
|
+
- Verify file format and size
|
|
345
|
+
- Track file lifecycle
|
|
346
|
+
|
|
347
|
+
**Example Response:**
|
|
348
|
+
```json
|
|
349
|
+
{
|
|
350
|
+
\"file_id\": \"f123\",
|
|
351
|
+
\"graph_id\": \"kg123\",
|
|
352
|
+
\"table_id\": \"t456\",
|
|
353
|
+
\"table_name\": \"Entity\",
|
|
354
|
+
\"file_name\": \"entities_batch1.parquet\",
|
|
355
|
+
\"file_format\": \"parquet\",
|
|
356
|
+
\"size_bytes\": 1048576,
|
|
357
|
+
\"row_count\": 5000,
|
|
358
|
+
\"upload_status\": \"uploaded\",
|
|
359
|
+
\"upload_method\": \"presigned_url\",
|
|
360
|
+
\"created_at\": \"2025-10-28T10:00:00Z\",
|
|
361
|
+
\"uploaded_at\": \"2025-10-28T10:01:30Z\",
|
|
362
|
+
\"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\"
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Example Usage:**
|
|
367
|
+
```bash
|
|
368
|
+
curl -H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
369
|
+
https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Note:**
|
|
373
|
+
File info retrieval is included - no credit consumption.
|
|
374
|
+
|
|
375
|
+
Args:
|
|
376
|
+
graph_id (str): Graph database identifier
|
|
377
|
+
file_id (str): File ID
|
|
378
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
379
|
+
authorization (Union[None, Unset, str]):
|
|
380
|
+
|
|
381
|
+
Raises:
|
|
382
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
383
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
384
|
+
|
|
385
|
+
Returns:
|
|
386
|
+
Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]
|
|
387
|
+
"""
|
|
388
|
+
|
|
389
|
+
return (
|
|
390
|
+
await asyncio_detailed(
|
|
391
|
+
graph_id=graph_id,
|
|
392
|
+
file_id=file_id,
|
|
393
|
+
client=client,
|
|
394
|
+
token=token,
|
|
395
|
+
authorization=authorization,
|
|
396
|
+
)
|
|
397
|
+
).parsed
|