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,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
@@ -1,247 +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_query_request import TableQueryRequest
11
- from ...models.table_query_response import TableQueryResponse
12
- from ...types import UNSET, Response, Unset
13
-
14
-
15
- def _get_kwargs(
16
- graph_id: str,
17
- *,
18
- body: TableQueryRequest,
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/query",
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, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
54
- if response.status_code == 200:
55
- response_200 = TableQueryResponse.from_dict(response.json())
56
-
57
- return response_200
58
-
59
- if response.status_code == 400:
60
- response_400 = ErrorResponse.from_dict(response.json())
61
-
62
- return response_400
63
-
64
- if response.status_code == 401:
65
- response_401 = cast(Any, None)
66
- return response_401
67
-
68
- if response.status_code == 403:
69
- response_403 = ErrorResponse.from_dict(response.json())
70
-
71
- return response_403
72
-
73
- if response.status_code == 404:
74
- response_404 = ErrorResponse.from_dict(response.json())
75
-
76
- return response_404
77
-
78
- if response.status_code == 422:
79
- response_422 = HTTPValidationError.from_dict(response.json())
80
-
81
- return response_422
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, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
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: TableQueryRequest,
105
- token: Union[None, Unset, str] = UNSET,
106
- authorization: Union[None, Unset, str] = UNSET,
107
- ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
108
- """Query Staging Tables with SQL
109
-
110
- Execute SQL queries on DuckDB staging tables
111
-
112
- Args:
113
- graph_id (str): Graph database identifier
114
- token (Union[None, Unset, str]): JWT token for SSE authentication
115
- authorization (Union[None, Unset, str]):
116
- body (TableQueryRequest):
117
-
118
- Raises:
119
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
120
- httpx.TimeoutException: If the request takes longer than Client.timeout.
121
-
122
- Returns:
123
- Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]
124
- """
125
-
126
- kwargs = _get_kwargs(
127
- graph_id=graph_id,
128
- body=body,
129
- token=token,
130
- authorization=authorization,
131
- )
132
-
133
- response = client.get_httpx_client().request(
134
- **kwargs,
135
- )
136
-
137
- return _build_response(client=client, response=response)
138
-
139
-
140
- def sync(
141
- graph_id: str,
142
- *,
143
- client: AuthenticatedClient,
144
- body: TableQueryRequest,
145
- token: Union[None, Unset, str] = UNSET,
146
- authorization: Union[None, Unset, str] = UNSET,
147
- ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
148
- """Query Staging Tables with SQL
149
-
150
- Execute SQL queries on DuckDB staging tables
151
-
152
- Args:
153
- graph_id (str): Graph database identifier
154
- token (Union[None, Unset, str]): JWT token for SSE authentication
155
- authorization (Union[None, Unset, str]):
156
- body (TableQueryRequest):
157
-
158
- Raises:
159
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
160
- httpx.TimeoutException: If the request takes longer than Client.timeout.
161
-
162
- Returns:
163
- Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]
164
- """
165
-
166
- return sync_detailed(
167
- graph_id=graph_id,
168
- client=client,
169
- body=body,
170
- token=token,
171
- authorization=authorization,
172
- ).parsed
173
-
174
-
175
- async def asyncio_detailed(
176
- graph_id: str,
177
- *,
178
- client: AuthenticatedClient,
179
- body: TableQueryRequest,
180
- token: Union[None, Unset, str] = UNSET,
181
- authorization: Union[None, Unset, str] = UNSET,
182
- ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
183
- """Query Staging Tables with SQL
184
-
185
- Execute SQL queries on DuckDB staging tables
186
-
187
- Args:
188
- graph_id (str): Graph database identifier
189
- token (Union[None, Unset, str]): JWT token for SSE authentication
190
- authorization (Union[None, Unset, str]):
191
- body (TableQueryRequest):
192
-
193
- Raises:
194
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
195
- httpx.TimeoutException: If the request takes longer than Client.timeout.
196
-
197
- Returns:
198
- Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]
199
- """
200
-
201
- kwargs = _get_kwargs(
202
- graph_id=graph_id,
203
- body=body,
204
- token=token,
205
- authorization=authorization,
206
- )
207
-
208
- response = await client.get_async_httpx_client().request(**kwargs)
209
-
210
- return _build_response(client=client, response=response)
211
-
212
-
213
- async def asyncio(
214
- graph_id: str,
215
- *,
216
- client: AuthenticatedClient,
217
- body: TableQueryRequest,
218
- token: Union[None, Unset, str] = UNSET,
219
- authorization: Union[None, Unset, str] = UNSET,
220
- ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
221
- """Query Staging Tables with SQL
222
-
223
- Execute SQL queries on DuckDB staging tables
224
-
225
- Args:
226
- graph_id (str): Graph database identifier
227
- token (Union[None, Unset, str]): JWT token for SSE authentication
228
- authorization (Union[None, Unset, str]):
229
- body (TableQueryRequest):
230
-
231
- Raises:
232
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
233
- httpx.TimeoutException: If the request takes longer than Client.timeout.
234
-
235
- Returns:
236
- Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]
237
- """
238
-
239
- return (
240
- await asyncio_detailed(
241
- graph_id=graph_id,
242
- client=client,
243
- body=body,
244
- token=token,
245
- authorization=authorization,
246
- )
247
- ).parsed