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,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.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 import (
10
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
11
- )
12
- from ...models.http_validation_error import HTTPValidationError
13
- from ...types import UNSET, Response, Unset
14
-
15
-
16
- def _get_kwargs(
17
- graph_id: str,
18
- file_id: 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/files/{file_id}",
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
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
55
- HTTPValidationError,
56
- ]
57
- ]:
58
- if response.status_code == 200:
59
- response_200 = GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet.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
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
97
- HTTPValidationError,
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
- file_id: 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
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
120
- HTTPValidationError,
121
- ]
122
- ]:
123
- """Get File Info
124
-
125
- Get detailed information about a specific file
126
-
127
- Args:
128
- graph_id (str): Graph database identifier
129
- file_id (str): File ID
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, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet, HTTPValidationError]]
139
- """
140
-
141
- kwargs = _get_kwargs(
142
- graph_id=graph_id,
143
- file_id=file_id,
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
- file_id: 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
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
167
- HTTPValidationError,
168
- ]
169
- ]:
170
- """Get File Info
171
-
172
- Get detailed information about a specific file
173
-
174
- Args:
175
- graph_id (str): Graph database identifier
176
- file_id (str): File ID
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, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet, HTTPValidationError]
186
- """
187
-
188
- return sync_detailed(
189
- graph_id=graph_id,
190
- file_id=file_id,
191
- client=client,
192
- token=token,
193
- authorization=authorization,
194
- ).parsed
195
-
196
-
197
- async def asyncio_detailed(
198
- graph_id: str,
199
- file_id: 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
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
209
- HTTPValidationError,
210
- ]
211
- ]:
212
- """Get File Info
213
-
214
- Get detailed information about a specific file
215
-
216
- Args:
217
- graph_id (str): Graph database identifier
218
- file_id (str): File ID
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, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet, HTTPValidationError]]
228
- """
229
-
230
- kwargs = _get_kwargs(
231
- graph_id=graph_id,
232
- file_id=file_id,
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
- file_id: 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
- GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet,
254
- HTTPValidationError,
255
- ]
256
- ]:
257
- """Get File Info
258
-
259
- Get detailed information about a specific file
260
-
261
- Args:
262
- graph_id (str): Graph database identifier
263
- file_id (str): File ID
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, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponseGetFileInfoV1GraphsGraphIdTablesFilesFileIdGet, HTTPValidationError]
273
- """
274
-
275
- return (
276
- await asyncio_detailed(
277
- graph_id=graph_id,
278
- file_id=file_id,
279
- client=client,
280
- token=token,
281
- authorization=authorization,
282
- )
283
- ).parsed
@@ -1,260 +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.file_upload_request import FileUploadRequest
10
- from ...models.file_upload_response import FileUploadResponse
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
- table_name: str,
18
- *,
19
- body: FileUploadRequest,
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": "post",
40
- "url": f"/v1/graphs/{graph_id}/tables/{table_name}/files",
41
- "params": params,
42
- }
43
-
44
- _kwargs["json"] = body.to_dict()
45
-
46
- headers["Content-Type"] = "application/json"
47
-
48
- _kwargs["headers"] = headers
49
- return _kwargs
50
-
51
-
52
- def _parse_response(
53
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
54
- ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
55
- if response.status_code == 200:
56
- response_200 = FileUploadResponse.from_dict(response.json())
57
-
58
- return response_200
59
-
60
- if response.status_code == 400:
61
- response_400 = ErrorResponse.from_dict(response.json())
62
-
63
- return response_400
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[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
93
- return Response(
94
- status_code=HTTPStatus(response.status_code),
95
- content=response.content,
96
- headers=response.headers,
97
- parsed=_parse_response(client=client, response=response),
98
- )
99
-
100
-
101
- def sync_detailed(
102
- graph_id: str,
103
- table_name: str,
104
- *,
105
- client: AuthenticatedClient,
106
- body: FileUploadRequest,
107
- token: Union[None, Unset, str] = UNSET,
108
- authorization: Union[None, Unset, str] = UNSET,
109
- ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
110
- """Create File Upload
111
-
112
- Create a new file upload for a table and get a presigned S3 URL
113
-
114
- Args:
115
- graph_id (str): Graph database identifier
116
- table_name (str): Table name
117
- token (Union[None, Unset, str]): JWT token for SSE authentication
118
- authorization (Union[None, Unset, str]):
119
- body (FileUploadRequest):
120
-
121
- Raises:
122
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
123
- httpx.TimeoutException: If the request takes longer than Client.timeout.
124
-
125
- Returns:
126
- Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
127
- """
128
-
129
- kwargs = _get_kwargs(
130
- graph_id=graph_id,
131
- table_name=table_name,
132
- body=body,
133
- token=token,
134
- authorization=authorization,
135
- )
136
-
137
- response = client.get_httpx_client().request(
138
- **kwargs,
139
- )
140
-
141
- return _build_response(client=client, response=response)
142
-
143
-
144
- def sync(
145
- graph_id: str,
146
- table_name: str,
147
- *,
148
- client: AuthenticatedClient,
149
- body: FileUploadRequest,
150
- token: Union[None, Unset, str] = UNSET,
151
- authorization: Union[None, Unset, str] = UNSET,
152
- ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
153
- """Create File Upload
154
-
155
- Create a new file upload for a table and get a presigned S3 URL
156
-
157
- Args:
158
- graph_id (str): Graph database identifier
159
- table_name (str): Table name
160
- token (Union[None, Unset, str]): JWT token for SSE authentication
161
- authorization (Union[None, Unset, str]):
162
- body (FileUploadRequest):
163
-
164
- Raises:
165
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
166
- httpx.TimeoutException: If the request takes longer than Client.timeout.
167
-
168
- Returns:
169
- Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
170
- """
171
-
172
- return sync_detailed(
173
- graph_id=graph_id,
174
- table_name=table_name,
175
- client=client,
176
- body=body,
177
- token=token,
178
- authorization=authorization,
179
- ).parsed
180
-
181
-
182
- async def asyncio_detailed(
183
- graph_id: str,
184
- table_name: str,
185
- *,
186
- client: AuthenticatedClient,
187
- body: FileUploadRequest,
188
- token: Union[None, Unset, str] = UNSET,
189
- authorization: Union[None, Unset, str] = UNSET,
190
- ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
191
- """Create File Upload
192
-
193
- Create a new file upload for a table and get a presigned S3 URL
194
-
195
- Args:
196
- graph_id (str): Graph database identifier
197
- table_name (str): Table name
198
- token (Union[None, Unset, str]): JWT token for SSE authentication
199
- authorization (Union[None, Unset, str]):
200
- body (FileUploadRequest):
201
-
202
- Raises:
203
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
204
- httpx.TimeoutException: If the request takes longer than Client.timeout.
205
-
206
- Returns:
207
- Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
208
- """
209
-
210
- kwargs = _get_kwargs(
211
- graph_id=graph_id,
212
- table_name=table_name,
213
- body=body,
214
- token=token,
215
- authorization=authorization,
216
- )
217
-
218
- response = await client.get_async_httpx_client().request(**kwargs)
219
-
220
- return _build_response(client=client, response=response)
221
-
222
-
223
- async def asyncio(
224
- graph_id: str,
225
- table_name: str,
226
- *,
227
- client: AuthenticatedClient,
228
- body: FileUploadRequest,
229
- token: Union[None, Unset, str] = UNSET,
230
- authorization: Union[None, Unset, str] = UNSET,
231
- ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
232
- """Create File Upload
233
-
234
- Create a new file upload for a table and get a presigned S3 URL
235
-
236
- Args:
237
- graph_id (str): Graph database identifier
238
- table_name (str): Table name
239
- token (Union[None, Unset, str]): JWT token for SSE authentication
240
- authorization (Union[None, Unset, str]):
241
- body (FileUploadRequest):
242
-
243
- Raises:
244
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
245
- httpx.TimeoutException: If the request takes longer than Client.timeout.
246
-
247
- Returns:
248
- Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
249
- """
250
-
251
- return (
252
- await asyncio_detailed(
253
- graph_id=graph_id,
254
- table_name=table_name,
255
- client=client,
256
- body=body,
257
- token=token,
258
- authorization=authorization,
259
- )
260
- ).parsed