robosystems-client 0.2.1__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 (36) hide show
  1. robosystems_client/api/tables/delete_file.py +437 -0
  2. robosystems_client/api/tables/get_file_info.py +397 -0
  3. robosystems_client/api/tables/get_upload_url.py +548 -0
  4. robosystems_client/api/tables/ingest_tables.py +616 -0
  5. robosystems_client/api/tables/list_table_files.py +509 -0
  6. robosystems_client/api/tables/list_tables.py +488 -0
  7. robosystems_client/api/tables/query_tables.py +487 -0
  8. robosystems_client/api/tables/update_file_status.py +539 -0
  9. robosystems_client/extensions/__init__.py +11 -0
  10. robosystems_client/extensions/extensions.py +3 -0
  11. robosystems_client/extensions/graph_client.py +326 -0
  12. robosystems_client/extensions/query_client.py +74 -1
  13. robosystems_client/extensions/table_ingest_client.py +31 -40
  14. robosystems_client/models/__init__.py +13 -17
  15. robosystems_client/models/create_graph_request.py +11 -0
  16. 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
  17. robosystems_client/models/file_info.py +169 -0
  18. robosystems_client/models/file_status_update.py +41 -0
  19. robosystems_client/models/get_file_info_response.py +205 -0
  20. robosystems_client/models/list_table_files_response.py +105 -0
  21. 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
  22. {robosystems_client-0.2.1.dist-info → robosystems_client-0.2.3.dist-info}/METADATA +1 -1
  23. {robosystems_client-0.2.1.dist-info → robosystems_client-0.2.3.dist-info}/RECORD +25 -23
  24. robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +0 -287
  25. robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +0 -283
  26. robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +0 -260
  27. robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +0 -251
  28. robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +0 -283
  29. robosystems_client/api/tables/list_tables_v1_graphs_graph_id_tables_get.py +0 -224
  30. robosystems_client/api/tables/query_tables_v1_graphs_graph_id_tables_query_post.py +0 -247
  31. robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +0 -306
  32. robosystems_client/models/file_update_request.py +0 -62
  33. 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
  34. 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
  35. {robosystems_client-0.2.1.dist-info → robosystems_client-0.2.3.dist-info}/WHEEL +0 -0
  36. {robosystems_client-0.2.1.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.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
@@ -1,224 +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.table_list_response import TableListResponse
11
- from ...types import UNSET, Response, Unset
12
-
13
-
14
- def _get_kwargs(
15
- graph_id: str,
16
- *,
17
- token: Union[None, Unset, str] = UNSET,
18
- authorization: Union[None, Unset, str] = UNSET,
19
- ) -> dict[str, Any]:
20
- headers: dict[str, Any] = {}
21
- if not isinstance(authorization, Unset):
22
- headers["authorization"] = authorization
23
-
24
- params: dict[str, Any] = {}
25
-
26
- json_token: Union[None, Unset, str]
27
- if isinstance(token, Unset):
28
- json_token = UNSET
29
- else:
30
- json_token = token
31
- params["token"] = json_token
32
-
33
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
34
-
35
- _kwargs: dict[str, Any] = {
36
- "method": "get",
37
- "url": f"/v1/graphs/{graph_id}/tables",
38
- "params": params,
39
- }
40
-
41
- _kwargs["headers"] = headers
42
- return _kwargs
43
-
44
-
45
- def _parse_response(
46
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
- ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]:
48
- if response.status_code == 200:
49
- response_200 = TableListResponse.from_dict(response.json())
50
-
51
- return response_200
52
-
53
- if response.status_code == 401:
54
- response_401 = cast(Any, None)
55
- return response_401
56
-
57
- if response.status_code == 403:
58
- response_403 = ErrorResponse.from_dict(response.json())
59
-
60
- return response_403
61
-
62
- if response.status_code == 404:
63
- response_404 = ErrorResponse.from_dict(response.json())
64
-
65
- return response_404
66
-
67
- if response.status_code == 422:
68
- response_422 = HTTPValidationError.from_dict(response.json())
69
-
70
- return response_422
71
-
72
- if client.raise_on_unexpected_status:
73
- raise errors.UnexpectedStatus(response.status_code, response.content)
74
- else:
75
- return None
76
-
77
-
78
- def _build_response(
79
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
80
- ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]:
81
- return Response(
82
- status_code=HTTPStatus(response.status_code),
83
- content=response.content,
84
- headers=response.headers,
85
- parsed=_parse_response(client=client, response=response),
86
- )
87
-
88
-
89
- def sync_detailed(
90
- graph_id: str,
91
- *,
92
- client: AuthenticatedClient,
93
- token: Union[None, Unset, str] = UNSET,
94
- authorization: Union[None, Unset, str] = UNSET,
95
- ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]:
96
- """List Staging Tables
97
-
98
- List all DuckDB staging tables for a graph
99
-
100
- Args:
101
- graph_id (str): Graph database identifier
102
- token (Union[None, Unset, str]): JWT token for SSE authentication
103
- authorization (Union[None, Unset, str]):
104
-
105
- Raises:
106
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
107
- httpx.TimeoutException: If the request takes longer than Client.timeout.
108
-
109
- Returns:
110
- Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]
111
- """
112
-
113
- kwargs = _get_kwargs(
114
- graph_id=graph_id,
115
- token=token,
116
- authorization=authorization,
117
- )
118
-
119
- response = client.get_httpx_client().request(
120
- **kwargs,
121
- )
122
-
123
- return _build_response(client=client, response=response)
124
-
125
-
126
- def sync(
127
- graph_id: str,
128
- *,
129
- client: AuthenticatedClient,
130
- token: Union[None, Unset, str] = UNSET,
131
- authorization: Union[None, Unset, str] = UNSET,
132
- ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]:
133
- """List Staging Tables
134
-
135
- List all DuckDB staging tables for a graph
136
-
137
- Args:
138
- graph_id (str): Graph database identifier
139
- token (Union[None, Unset, str]): JWT token for SSE authentication
140
- authorization (Union[None, Unset, str]):
141
-
142
- Raises:
143
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
- httpx.TimeoutException: If the request takes longer than Client.timeout.
145
-
146
- Returns:
147
- Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]
148
- """
149
-
150
- return sync_detailed(
151
- graph_id=graph_id,
152
- client=client,
153
- token=token,
154
- authorization=authorization,
155
- ).parsed
156
-
157
-
158
- async def asyncio_detailed(
159
- graph_id: str,
160
- *,
161
- client: AuthenticatedClient,
162
- token: Union[None, Unset, str] = UNSET,
163
- authorization: Union[None, Unset, str] = UNSET,
164
- ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]:
165
- """List Staging Tables
166
-
167
- List all DuckDB staging tables for a graph
168
-
169
- Args:
170
- graph_id (str): Graph database identifier
171
- token (Union[None, Unset, str]): JWT token for SSE authentication
172
- authorization (Union[None, Unset, str]):
173
-
174
- Raises:
175
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
176
- httpx.TimeoutException: If the request takes longer than Client.timeout.
177
-
178
- Returns:
179
- Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]
180
- """
181
-
182
- kwargs = _get_kwargs(
183
- graph_id=graph_id,
184
- token=token,
185
- authorization=authorization,
186
- )
187
-
188
- response = await client.get_async_httpx_client().request(**kwargs)
189
-
190
- return _build_response(client=client, response=response)
191
-
192
-
193
- async def asyncio(
194
- graph_id: str,
195
- *,
196
- client: AuthenticatedClient,
197
- token: Union[None, Unset, str] = UNSET,
198
- authorization: Union[None, Unset, str] = UNSET,
199
- ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]:
200
- """List Staging Tables
201
-
202
- List all DuckDB staging tables for a graph
203
-
204
- Args:
205
- graph_id (str): Graph database identifier
206
- token (Union[None, Unset, str]): JWT token for SSE authentication
207
- authorization (Union[None, Unset, str]):
208
-
209
- Raises:
210
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
211
- httpx.TimeoutException: If the request takes longer than Client.timeout.
212
-
213
- Returns:
214
- Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]
215
- """
216
-
217
- return (
218
- await asyncio_detailed(
219
- graph_id=graph_id,
220
- client=client,
221
- token=token,
222
- authorization=authorization,
223
- )
224
- ).parsed