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.

Files changed (34) hide show
  1. robosystems_client/api/query/execute_cypher_query.py +0 -5
  2. robosystems_client/api/tables/delete_file.py +437 -0
  3. robosystems_client/api/tables/get_file_info.py +397 -0
  4. robosystems_client/api/tables/get_upload_url.py +548 -0
  5. robosystems_client/api/tables/ingest_tables.py +616 -0
  6. robosystems_client/api/tables/list_table_files.py +509 -0
  7. robosystems_client/api/tables/list_tables.py +488 -0
  8. robosystems_client/api/tables/query_tables.py +487 -0
  9. robosystems_client/api/tables/update_file_status.py +539 -0
  10. robosystems_client/extensions/graph_client.py +5 -0
  11. robosystems_client/extensions/table_ingest_client.py +31 -40
  12. robosystems_client/models/__init__.py +13 -17
  13. robosystems_client/models/create_graph_request.py +11 -0
  14. 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
  15. robosystems_client/models/file_info.py +169 -0
  16. robosystems_client/models/file_status_update.py +41 -0
  17. robosystems_client/models/get_file_info_response.py +205 -0
  18. robosystems_client/models/list_table_files_response.py +105 -0
  19. 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
  20. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.3.dist-info}/METADATA +1 -1
  21. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.3.dist-info}/RECORD +23 -22
  22. robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +0 -287
  23. robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +0 -283
  24. robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +0 -260
  25. robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +0 -251
  26. robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +0 -283
  27. robosystems_client/api/tables/list_tables_v1_graphs_graph_id_tables_get.py +0 -224
  28. robosystems_client/api/tables/query_tables_v1_graphs_graph_id_tables_query_post.py +0 -247
  29. robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +0 -306
  30. robosystems_client/models/file_update_request.py +0 -62
  31. 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
  32. 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
  33. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.3.dist-info}/WHEEL +0 -0
  34. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,251 +0,0 @@
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.bulk_ingest_request import BulkIngestRequest
9
- from ...models.bulk_ingest_response import BulkIngestResponse
10
- from ...models.error_response import ErrorResponse
11
- from ...models.http_validation_error import HTTPValidationError
12
- from ...types import UNSET, Response, Unset
13
-
14
-
15
- def _get_kwargs(
16
- graph_id: str,
17
- *,
18
- body: BulkIngestRequest,
19
- token: Union[None, Unset, str] = UNSET,
20
- authorization: Union[None, Unset, str] = UNSET,
21
- ) -> dict[str, Any]:
22
- headers: dict[str, Any] = {}
23
- if not isinstance(authorization, Unset):
24
- headers["authorization"] = authorization
25
-
26
- params: dict[str, Any] = {}
27
-
28
- json_token: Union[None, Unset, str]
29
- if isinstance(token, Unset):
30
- json_token = UNSET
31
- else:
32
- json_token = token
33
- params["token"] = json_token
34
-
35
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
36
-
37
- _kwargs: dict[str, Any] = {
38
- "method": "post",
39
- "url": f"/v1/graphs/{graph_id}/tables/ingest",
40
- "params": params,
41
- }
42
-
43
- _kwargs["json"] = body.to_dict()
44
-
45
- headers["Content-Type"] = "application/json"
46
-
47
- _kwargs["headers"] = headers
48
- return _kwargs
49
-
50
-
51
- def _parse_response(
52
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
53
- ) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
54
- if response.status_code == 200:
55
- response_200 = BulkIngestResponse.from_dict(response.json())
56
-
57
- return response_200
58
-
59
- if response.status_code == 401:
60
- response_401 = cast(Any, None)
61
- return response_401
62
-
63
- if response.status_code == 403:
64
- response_403 = ErrorResponse.from_dict(response.json())
65
-
66
- return response_403
67
-
68
- if response.status_code == 404:
69
- response_404 = ErrorResponse.from_dict(response.json())
70
-
71
- return response_404
72
-
73
- if response.status_code == 422:
74
- response_422 = HTTPValidationError.from_dict(response.json())
75
-
76
- return response_422
77
-
78
- if response.status_code == 500:
79
- response_500 = ErrorResponse.from_dict(response.json())
80
-
81
- return response_500
82
-
83
- if client.raise_on_unexpected_status:
84
- raise errors.UnexpectedStatus(response.status_code, response.content)
85
- else:
86
- return None
87
-
88
-
89
- def _build_response(
90
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
91
- ) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
92
- return Response(
93
- status_code=HTTPStatus(response.status_code),
94
- content=response.content,
95
- headers=response.headers,
96
- parsed=_parse_response(client=client, response=response),
97
- )
98
-
99
-
100
- def sync_detailed(
101
- graph_id: str,
102
- *,
103
- client: AuthenticatedClient,
104
- body: BulkIngestRequest,
105
- token: Union[None, Unset, str] = UNSET,
106
- authorization: Union[None, Unset, str] = UNSET,
107
- ) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
108
- """Ingest Tables to Graph
109
-
110
- Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. Use
111
- rebuild=true to regenerate the entire graph from scratch (safe operation - S3 is source of truth).
112
-
113
- Args:
114
- graph_id (str): Graph database identifier
115
- token (Union[None, Unset, str]): JWT token for SSE authentication
116
- authorization (Union[None, Unset, str]):
117
- body (BulkIngestRequest):
118
-
119
- Raises:
120
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
121
- httpx.TimeoutException: If the request takes longer than Client.timeout.
122
-
123
- Returns:
124
- Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]
125
- """
126
-
127
- kwargs = _get_kwargs(
128
- graph_id=graph_id,
129
- body=body,
130
- token=token,
131
- authorization=authorization,
132
- )
133
-
134
- response = client.get_httpx_client().request(
135
- **kwargs,
136
- )
137
-
138
- return _build_response(client=client, response=response)
139
-
140
-
141
- def sync(
142
- graph_id: str,
143
- *,
144
- client: AuthenticatedClient,
145
- body: BulkIngestRequest,
146
- token: Union[None, Unset, str] = UNSET,
147
- authorization: Union[None, Unset, str] = UNSET,
148
- ) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
149
- """Ingest Tables to Graph
150
-
151
- Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. Use
152
- rebuild=true to regenerate the entire graph from scratch (safe operation - S3 is source of truth).
153
-
154
- Args:
155
- graph_id (str): Graph database identifier
156
- token (Union[None, Unset, str]): JWT token for SSE authentication
157
- authorization (Union[None, Unset, str]):
158
- body (BulkIngestRequest):
159
-
160
- Raises:
161
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
162
- httpx.TimeoutException: If the request takes longer than Client.timeout.
163
-
164
- Returns:
165
- Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]
166
- """
167
-
168
- return sync_detailed(
169
- graph_id=graph_id,
170
- client=client,
171
- body=body,
172
- token=token,
173
- authorization=authorization,
174
- ).parsed
175
-
176
-
177
- async def asyncio_detailed(
178
- graph_id: str,
179
- *,
180
- client: AuthenticatedClient,
181
- body: BulkIngestRequest,
182
- token: Union[None, Unset, str] = UNSET,
183
- authorization: Union[None, Unset, str] = UNSET,
184
- ) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
185
- """Ingest Tables to Graph
186
-
187
- Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. Use
188
- rebuild=true to regenerate the entire graph from scratch (safe operation - S3 is source of truth).
189
-
190
- Args:
191
- graph_id (str): Graph database identifier
192
- token (Union[None, Unset, str]): JWT token for SSE authentication
193
- authorization (Union[None, Unset, str]):
194
- body (BulkIngestRequest):
195
-
196
- Raises:
197
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
198
- httpx.TimeoutException: If the request takes longer than Client.timeout.
199
-
200
- Returns:
201
- Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]
202
- """
203
-
204
- kwargs = _get_kwargs(
205
- graph_id=graph_id,
206
- body=body,
207
- token=token,
208
- authorization=authorization,
209
- )
210
-
211
- response = await client.get_async_httpx_client().request(**kwargs)
212
-
213
- return _build_response(client=client, response=response)
214
-
215
-
216
- async def asyncio(
217
- graph_id: str,
218
- *,
219
- client: AuthenticatedClient,
220
- body: BulkIngestRequest,
221
- token: Union[None, Unset, str] = UNSET,
222
- authorization: Union[None, Unset, str] = UNSET,
223
- ) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
224
- """Ingest Tables to Graph
225
-
226
- Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. Use
227
- rebuild=true to regenerate the entire graph from scratch (safe operation - S3 is source of truth).
228
-
229
- Args:
230
- graph_id (str): Graph database identifier
231
- token (Union[None, Unset, str]): JWT token for SSE authentication
232
- authorization (Union[None, Unset, str]):
233
- body (BulkIngestRequest):
234
-
235
- Raises:
236
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
237
- httpx.TimeoutException: If the request takes longer than Client.timeout.
238
-
239
- Returns:
240
- Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]
241
- """
242
-
243
- return (
244
- await asyncio_detailed(
245
- graph_id=graph_id,
246
- client=client,
247
- body=body,
248
- token=token,
249
- authorization=authorization,
250
- )
251
- ).parsed
@@ -1,283 +0,0 @@
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.http_validation_error import HTTPValidationError
10
- from ...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 import (
11
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
12
- )
13
- from ...types import UNSET, Response, Unset
14
-
15
-
16
- def _get_kwargs(
17
- graph_id: str,
18
- table_name: str,
19
- *,
20
- token: Union[None, Unset, str] = UNSET,
21
- authorization: Union[None, Unset, str] = UNSET,
22
- ) -> dict[str, Any]:
23
- headers: dict[str, Any] = {}
24
- if not isinstance(authorization, Unset):
25
- headers["authorization"] = authorization
26
-
27
- params: dict[str, Any] = {}
28
-
29
- json_token: Union[None, Unset, str]
30
- if isinstance(token, Unset):
31
- json_token = UNSET
32
- else:
33
- json_token = token
34
- params["token"] = json_token
35
-
36
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
37
-
38
- _kwargs: dict[str, Any] = {
39
- "method": "get",
40
- "url": f"/v1/graphs/{graph_id}/tables/{table_name}/files",
41
- "params": params,
42
- }
43
-
44
- _kwargs["headers"] = headers
45
- return _kwargs
46
-
47
-
48
- def _parse_response(
49
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
50
- ) -> Optional[
51
- Union[
52
- Any,
53
- ErrorResponse,
54
- HTTPValidationError,
55
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
56
- ]
57
- ]:
58
- if response.status_code == 200:
59
- response_200 = ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet.from_dict(
60
- response.json()
61
- )
62
-
63
- return response_200
64
-
65
- if response.status_code == 401:
66
- response_401 = cast(Any, None)
67
- return response_401
68
-
69
- if response.status_code == 403:
70
- response_403 = ErrorResponse.from_dict(response.json())
71
-
72
- return response_403
73
-
74
- if response.status_code == 404:
75
- response_404 = ErrorResponse.from_dict(response.json())
76
-
77
- return response_404
78
-
79
- if response.status_code == 422:
80
- response_422 = HTTPValidationError.from_dict(response.json())
81
-
82
- return response_422
83
-
84
- if client.raise_on_unexpected_status:
85
- raise errors.UnexpectedStatus(response.status_code, response.content)
86
- else:
87
- return None
88
-
89
-
90
- def _build_response(
91
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
92
- ) -> Response[
93
- Union[
94
- Any,
95
- ErrorResponse,
96
- HTTPValidationError,
97
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
98
- ]
99
- ]:
100
- return Response(
101
- status_code=HTTPStatus(response.status_code),
102
- content=response.content,
103
- headers=response.headers,
104
- parsed=_parse_response(client=client, response=response),
105
- )
106
-
107
-
108
- def sync_detailed(
109
- graph_id: str,
110
- table_name: str,
111
- *,
112
- client: AuthenticatedClient,
113
- token: Union[None, Unset, str] = UNSET,
114
- authorization: Union[None, Unset, str] = UNSET,
115
- ) -> Response[
116
- Union[
117
- Any,
118
- ErrorResponse,
119
- HTTPValidationError,
120
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
121
- ]
122
- ]:
123
- """List Files in Table
124
-
125
- List all files uploaded to a staging table
126
-
127
- Args:
128
- graph_id (str): Graph database identifier
129
- table_name (str): Table name
130
- token (Union[None, Unset, str]): JWT token for SSE authentication
131
- authorization (Union[None, Unset, str]):
132
-
133
- Raises:
134
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
135
- httpx.TimeoutException: If the request takes longer than Client.timeout.
136
-
137
- Returns:
138
- Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet]]
139
- """
140
-
141
- kwargs = _get_kwargs(
142
- graph_id=graph_id,
143
- table_name=table_name,
144
- token=token,
145
- authorization=authorization,
146
- )
147
-
148
- response = client.get_httpx_client().request(
149
- **kwargs,
150
- )
151
-
152
- return _build_response(client=client, response=response)
153
-
154
-
155
- def sync(
156
- graph_id: str,
157
- table_name: str,
158
- *,
159
- client: AuthenticatedClient,
160
- token: Union[None, Unset, str] = UNSET,
161
- authorization: Union[None, Unset, str] = UNSET,
162
- ) -> Optional[
163
- Union[
164
- Any,
165
- ErrorResponse,
166
- HTTPValidationError,
167
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
168
- ]
169
- ]:
170
- """List Files in Table
171
-
172
- List all files uploaded to a staging table
173
-
174
- Args:
175
- graph_id (str): Graph database identifier
176
- table_name (str): Table name
177
- token (Union[None, Unset, str]): JWT token for SSE authentication
178
- authorization (Union[None, Unset, str]):
179
-
180
- Raises:
181
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
182
- httpx.TimeoutException: If the request takes longer than Client.timeout.
183
-
184
- Returns:
185
- Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet]
186
- """
187
-
188
- return sync_detailed(
189
- graph_id=graph_id,
190
- table_name=table_name,
191
- client=client,
192
- token=token,
193
- authorization=authorization,
194
- ).parsed
195
-
196
-
197
- async def asyncio_detailed(
198
- graph_id: str,
199
- table_name: str,
200
- *,
201
- client: AuthenticatedClient,
202
- token: Union[None, Unset, str] = UNSET,
203
- authorization: Union[None, Unset, str] = UNSET,
204
- ) -> Response[
205
- Union[
206
- Any,
207
- ErrorResponse,
208
- HTTPValidationError,
209
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
210
- ]
211
- ]:
212
- """List Files in Table
213
-
214
- List all files uploaded to a staging table
215
-
216
- Args:
217
- graph_id (str): Graph database identifier
218
- table_name (str): Table name
219
- token (Union[None, Unset, str]): JWT token for SSE authentication
220
- authorization (Union[None, Unset, str]):
221
-
222
- Raises:
223
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
224
- httpx.TimeoutException: If the request takes longer than Client.timeout.
225
-
226
- Returns:
227
- Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet]]
228
- """
229
-
230
- kwargs = _get_kwargs(
231
- graph_id=graph_id,
232
- table_name=table_name,
233
- token=token,
234
- authorization=authorization,
235
- )
236
-
237
- response = await client.get_async_httpx_client().request(**kwargs)
238
-
239
- return _build_response(client=client, response=response)
240
-
241
-
242
- async def asyncio(
243
- graph_id: str,
244
- table_name: str,
245
- *,
246
- client: AuthenticatedClient,
247
- token: Union[None, Unset, str] = UNSET,
248
- authorization: Union[None, Unset, str] = UNSET,
249
- ) -> Optional[
250
- Union[
251
- Any,
252
- ErrorResponse,
253
- HTTPValidationError,
254
- ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet,
255
- ]
256
- ]:
257
- """List Files in Table
258
-
259
- List all files uploaded to a staging table
260
-
261
- Args:
262
- graph_id (str): Graph database identifier
263
- table_name (str): Table name
264
- token (Union[None, Unset, str]): JWT token for SSE authentication
265
- authorization (Union[None, Unset, str]):
266
-
267
- Raises:
268
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
269
- httpx.TimeoutException: If the request takes longer than Client.timeout.
270
-
271
- Returns:
272
- Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponseListTableFilesV1GraphsGraphIdTablesTableNameFilesGet]
273
- """
274
-
275
- return (
276
- await asyncio_detailed(
277
- graph_id=graph_id,
278
- table_name=table_name,
279
- client=client,
280
- token=token,
281
- authorization=authorization,
282
- )
283
- ).parsed