worqhat 3.10.0__py3-none-any.whl → 4.2.0__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.
- worqhat/__init__.py +8 -89
- worqhat/client.py +62 -0
- worqhat/exceptions.py +43 -0
- worqhat/http_client.py +171 -0
- worqhat/py.typed +1 -0
- worqhat/resources/__init__.py +5 -59
- worqhat/resources/database.py +293 -0
- worqhat/resources/flows.py +61 -409
- worqhat/resources/storage.py +41 -431
- worqhat-4.2.0.dist-info/METADATA +538 -0
- worqhat-4.2.0.dist-info/RECORD +13 -0
- {worqhat-3.10.0.dist-info → worqhat-4.2.0.dist-info}/WHEEL +2 -1
- worqhat-4.2.0.dist-info/top_level.txt +1 -0
- worqhat/_base_client.py +0 -1995
- worqhat/_client.py +0 -484
- worqhat/_compat.py +0 -219
- worqhat/_constants.py +0 -14
- worqhat/_exceptions.py +0 -108
- worqhat/_files.py +0 -123
- worqhat/_models.py +0 -835
- worqhat/_qs.py +0 -150
- worqhat/_resource.py +0 -43
- worqhat/_response.py +0 -830
- worqhat/_streaming.py +0 -333
- worqhat/_types.py +0 -260
- worqhat/_utils/__init__.py +0 -64
- worqhat/_utils/_compat.py +0 -45
- worqhat/_utils/_datetime_parse.py +0 -136
- worqhat/_utils/_logs.py +0 -25
- worqhat/_utils/_proxy.py +0 -65
- worqhat/_utils/_reflection.py +0 -42
- worqhat/_utils/_resources_proxy.py +0 -24
- worqhat/_utils/_streams.py +0 -12
- worqhat/_utils/_sync.py +0 -86
- worqhat/_utils/_transform.py +0 -457
- worqhat/_utils/_typing.py +0 -156
- worqhat/_utils/_utils.py +0 -421
- worqhat/_version.py +0 -4
- worqhat/lib/.keep +0 -4
- worqhat/resources/db/__init__.py +0 -33
- worqhat/resources/db/db.py +0 -1650
- worqhat/resources/db/tables.py +0 -389
- worqhat/resources/health.py +0 -143
- worqhat/types/__init__.py +0 -44
- worqhat/types/db/__init__.py +0 -10
- worqhat/types/db/table_get_row_count_params.py +0 -12
- worqhat/types/db/table_get_row_count_response.py +0 -15
- worqhat/types/db/table_list_params.py +0 -15
- worqhat/types/db/table_list_response.py +0 -26
- worqhat/types/db/table_retrieve_schema_params.py +0 -12
- worqhat/types/db/table_retrieve_schema_response.py +0 -29
- worqhat/types/db_cluster_params.py +0 -27
- worqhat/types/db_cluster_response.py +0 -44
- worqhat/types/db_delete_records_params.py +0 -19
- worqhat/types/db_delete_records_response.py +0 -18
- worqhat/types/db_detect_anomalies_params.py +0 -24
- worqhat/types/db_detect_anomalies_response.py +0 -50
- worqhat/types/db_execute_batch_params.py +0 -36
- worqhat/types/db_execute_batch_response.py +0 -27
- worqhat/types/db_execute_query_params.py +0 -24
- worqhat/types/db_execute_query_response.py +0 -21
- worqhat/types/db_find_similar_params.py +0 -31
- worqhat/types/db_find_similar_response.py +0 -30
- worqhat/types/db_hybrid_search_params.py +0 -32
- worqhat/types/db_hybrid_search_response.py +0 -48
- worqhat/types/db_insert_record_params.py +0 -19
- worqhat/types/db_insert_record_response.py +0 -15
- worqhat/types/db_process_nl_query_params.py +0 -19
- worqhat/types/db_process_nl_query_response.py +0 -18
- worqhat/types/db_recommend_params.py +0 -33
- worqhat/types/db_recommend_response.py +0 -36
- worqhat/types/db_semantic_search_params.py +0 -33
- worqhat/types/db_semantic_search_response.py +0 -36
- worqhat/types/db_update_records_params.py +0 -22
- worqhat/types/db_update_records_response.py +0 -18
- worqhat/types/flow_get_metrics_params.py +0 -25
- worqhat/types/flow_get_metrics_response.py +0 -55
- worqhat/types/flow_trigger_with_file_params.py +0 -17
- worqhat/types/flow_trigger_with_file_response.py +0 -18
- worqhat/types/flow_trigger_with_payload_params.py +0 -13
- worqhat/types/flow_trigger_with_payload_response.py +0 -20
- worqhat/types/get_server_info_response.py +0 -15
- worqhat/types/health_check_response.py +0 -33
- worqhat/types/storage_delete_file_by_id_response.py +0 -18
- worqhat/types/storage_retrieve_file_by_id_response.py +0 -33
- worqhat/types/storage_retrieve_file_by_path_params.py +0 -12
- worqhat/types/storage_retrieve_file_by_path_response.py +0 -33
- worqhat/types/storage_upload_file_params.py +0 -17
- worqhat/types/storage_upload_file_response.py +0 -33
- worqhat-3.10.0.dist-info/METADATA +0 -432
- worqhat-3.10.0.dist-info/RECORD +0 -85
- worqhat-3.10.0.dist-info/licenses/LICENSE +0 -201
worqhat/resources/db/tables.py
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing_extensions import Literal
|
|
6
|
-
|
|
7
|
-
import httpx
|
|
8
|
-
|
|
9
|
-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
|
-
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
-
from ..._compat import cached_property
|
|
12
|
-
from ...types.db import table_list_params, table_get_row_count_params, table_retrieve_schema_params
|
|
13
|
-
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
-
from ..._response import (
|
|
15
|
-
to_raw_response_wrapper,
|
|
16
|
-
to_streamed_response_wrapper,
|
|
17
|
-
async_to_raw_response_wrapper,
|
|
18
|
-
async_to_streamed_response_wrapper,
|
|
19
|
-
)
|
|
20
|
-
from ..._base_client import make_request_options
|
|
21
|
-
from ...types.db.table_list_response import TableListResponse
|
|
22
|
-
from ...types.db.table_get_row_count_response import TableGetRowCountResponse
|
|
23
|
-
from ...types.db.table_retrieve_schema_response import TableRetrieveSchemaResponse
|
|
24
|
-
|
|
25
|
-
__all__ = ["TablesResource", "AsyncTablesResource"]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class TablesResource(SyncAPIResource):
|
|
29
|
-
@cached_property
|
|
30
|
-
def with_raw_response(self) -> TablesResourceWithRawResponse:
|
|
31
|
-
"""
|
|
32
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
33
|
-
the raw response object instead of the parsed content.
|
|
34
|
-
|
|
35
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
36
|
-
"""
|
|
37
|
-
return TablesResourceWithRawResponse(self)
|
|
38
|
-
|
|
39
|
-
@cached_property
|
|
40
|
-
def with_streaming_response(self) -> TablesResourceWithStreamingResponse:
|
|
41
|
-
"""
|
|
42
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
-
|
|
44
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
45
|
-
"""
|
|
46
|
-
return TablesResourceWithStreamingResponse(self)
|
|
47
|
-
|
|
48
|
-
def list(
|
|
49
|
-
self,
|
|
50
|
-
*,
|
|
51
|
-
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
52
|
-
schema: str | Omit = omit,
|
|
53
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
54
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
55
|
-
extra_headers: Headers | None = None,
|
|
56
|
-
extra_query: Query | None = None,
|
|
57
|
-
extra_body: Body | None = None,
|
|
58
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
59
|
-
) -> TableListResponse:
|
|
60
|
-
"""
|
|
61
|
-
Returns a list of all tables in the database that are accessible to your
|
|
62
|
-
organization. Optionally filter by schema and environment.
|
|
63
|
-
|
|
64
|
-
Args:
|
|
65
|
-
environment: Environment to query (development, staging, production)
|
|
66
|
-
|
|
67
|
-
schema: Database schema to filter tables
|
|
68
|
-
|
|
69
|
-
extra_headers: Send extra headers
|
|
70
|
-
|
|
71
|
-
extra_query: Add additional query parameters to the request
|
|
72
|
-
|
|
73
|
-
extra_body: Add additional JSON properties to the request
|
|
74
|
-
|
|
75
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
76
|
-
"""
|
|
77
|
-
return self._get(
|
|
78
|
-
"/db/tables",
|
|
79
|
-
options=make_request_options(
|
|
80
|
-
extra_headers=extra_headers,
|
|
81
|
-
extra_query=extra_query,
|
|
82
|
-
extra_body=extra_body,
|
|
83
|
-
timeout=timeout,
|
|
84
|
-
query=maybe_transform(
|
|
85
|
-
{
|
|
86
|
-
"environment": environment,
|
|
87
|
-
"schema": schema,
|
|
88
|
-
},
|
|
89
|
-
table_list_params.TableListParams,
|
|
90
|
-
),
|
|
91
|
-
),
|
|
92
|
-
cast_to=TableListResponse,
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
def get_row_count(
|
|
96
|
-
self,
|
|
97
|
-
table_name: str,
|
|
98
|
-
*,
|
|
99
|
-
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
100
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
101
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
102
|
-
extra_headers: Headers | None = None,
|
|
103
|
-
extra_query: Query | None = None,
|
|
104
|
-
extra_body: Body | None = None,
|
|
105
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
106
|
-
) -> TableGetRowCountResponse:
|
|
107
|
-
"""
|
|
108
|
-
Returns the total number of rows in the specified table for your organization.
|
|
109
|
-
|
|
110
|
-
Args:
|
|
111
|
-
environment: Environment to query
|
|
112
|
-
|
|
113
|
-
extra_headers: Send extra headers
|
|
114
|
-
|
|
115
|
-
extra_query: Add additional query parameters to the request
|
|
116
|
-
|
|
117
|
-
extra_body: Add additional JSON properties to the request
|
|
118
|
-
|
|
119
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
120
|
-
"""
|
|
121
|
-
if not table_name:
|
|
122
|
-
raise ValueError(f"Expected a non-empty value for `table_name` but received {table_name!r}")
|
|
123
|
-
return self._get(
|
|
124
|
-
f"/db/tables/{table_name}/count",
|
|
125
|
-
options=make_request_options(
|
|
126
|
-
extra_headers=extra_headers,
|
|
127
|
-
extra_query=extra_query,
|
|
128
|
-
extra_body=extra_body,
|
|
129
|
-
timeout=timeout,
|
|
130
|
-
query=maybe_transform({"environment": environment}, table_get_row_count_params.TableGetRowCountParams),
|
|
131
|
-
),
|
|
132
|
-
cast_to=TableGetRowCountResponse,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
def retrieve_schema(
|
|
136
|
-
self,
|
|
137
|
-
table_name: str,
|
|
138
|
-
*,
|
|
139
|
-
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
140
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
141
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
142
|
-
extra_headers: Headers | None = None,
|
|
143
|
-
extra_query: Query | None = None,
|
|
144
|
-
extra_body: Body | None = None,
|
|
145
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
146
|
-
) -> TableRetrieveSchemaResponse:
|
|
147
|
-
"""
|
|
148
|
-
Returns detailed schema information for a specific table, including column
|
|
149
|
-
names, types, and constraints.
|
|
150
|
-
|
|
151
|
-
Args:
|
|
152
|
-
environment: Environment to query
|
|
153
|
-
|
|
154
|
-
extra_headers: Send extra headers
|
|
155
|
-
|
|
156
|
-
extra_query: Add additional query parameters to the request
|
|
157
|
-
|
|
158
|
-
extra_body: Add additional JSON properties to the request
|
|
159
|
-
|
|
160
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
161
|
-
"""
|
|
162
|
-
if not table_name:
|
|
163
|
-
raise ValueError(f"Expected a non-empty value for `table_name` but received {table_name!r}")
|
|
164
|
-
return self._get(
|
|
165
|
-
f"/db/tables/{table_name}/schema",
|
|
166
|
-
options=make_request_options(
|
|
167
|
-
extra_headers=extra_headers,
|
|
168
|
-
extra_query=extra_query,
|
|
169
|
-
extra_body=extra_body,
|
|
170
|
-
timeout=timeout,
|
|
171
|
-
query=maybe_transform(
|
|
172
|
-
{"environment": environment}, table_retrieve_schema_params.TableRetrieveSchemaParams
|
|
173
|
-
),
|
|
174
|
-
),
|
|
175
|
-
cast_to=TableRetrieveSchemaResponse,
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
class AsyncTablesResource(AsyncAPIResource):
|
|
180
|
-
@cached_property
|
|
181
|
-
def with_raw_response(self) -> AsyncTablesResourceWithRawResponse:
|
|
182
|
-
"""
|
|
183
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
184
|
-
the raw response object instead of the parsed content.
|
|
185
|
-
|
|
186
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
187
|
-
"""
|
|
188
|
-
return AsyncTablesResourceWithRawResponse(self)
|
|
189
|
-
|
|
190
|
-
@cached_property
|
|
191
|
-
def with_streaming_response(self) -> AsyncTablesResourceWithStreamingResponse:
|
|
192
|
-
"""
|
|
193
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
194
|
-
|
|
195
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
196
|
-
"""
|
|
197
|
-
return AsyncTablesResourceWithStreamingResponse(self)
|
|
198
|
-
|
|
199
|
-
async def list(
|
|
200
|
-
self,
|
|
201
|
-
*,
|
|
202
|
-
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
203
|
-
schema: str | Omit = omit,
|
|
204
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
205
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
206
|
-
extra_headers: Headers | None = None,
|
|
207
|
-
extra_query: Query | None = None,
|
|
208
|
-
extra_body: Body | None = None,
|
|
209
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
210
|
-
) -> TableListResponse:
|
|
211
|
-
"""
|
|
212
|
-
Returns a list of all tables in the database that are accessible to your
|
|
213
|
-
organization. Optionally filter by schema and environment.
|
|
214
|
-
|
|
215
|
-
Args:
|
|
216
|
-
environment: Environment to query (development, staging, production)
|
|
217
|
-
|
|
218
|
-
schema: Database schema to filter tables
|
|
219
|
-
|
|
220
|
-
extra_headers: Send extra headers
|
|
221
|
-
|
|
222
|
-
extra_query: Add additional query parameters to the request
|
|
223
|
-
|
|
224
|
-
extra_body: Add additional JSON properties to the request
|
|
225
|
-
|
|
226
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
227
|
-
"""
|
|
228
|
-
return await self._get(
|
|
229
|
-
"/db/tables",
|
|
230
|
-
options=make_request_options(
|
|
231
|
-
extra_headers=extra_headers,
|
|
232
|
-
extra_query=extra_query,
|
|
233
|
-
extra_body=extra_body,
|
|
234
|
-
timeout=timeout,
|
|
235
|
-
query=await async_maybe_transform(
|
|
236
|
-
{
|
|
237
|
-
"environment": environment,
|
|
238
|
-
"schema": schema,
|
|
239
|
-
},
|
|
240
|
-
table_list_params.TableListParams,
|
|
241
|
-
),
|
|
242
|
-
),
|
|
243
|
-
cast_to=TableListResponse,
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
async def get_row_count(
|
|
247
|
-
self,
|
|
248
|
-
table_name: str,
|
|
249
|
-
*,
|
|
250
|
-
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
251
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
252
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
253
|
-
extra_headers: Headers | None = None,
|
|
254
|
-
extra_query: Query | None = None,
|
|
255
|
-
extra_body: Body | None = None,
|
|
256
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
257
|
-
) -> TableGetRowCountResponse:
|
|
258
|
-
"""
|
|
259
|
-
Returns the total number of rows in the specified table for your organization.
|
|
260
|
-
|
|
261
|
-
Args:
|
|
262
|
-
environment: Environment to query
|
|
263
|
-
|
|
264
|
-
extra_headers: Send extra headers
|
|
265
|
-
|
|
266
|
-
extra_query: Add additional query parameters to the request
|
|
267
|
-
|
|
268
|
-
extra_body: Add additional JSON properties to the request
|
|
269
|
-
|
|
270
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
271
|
-
"""
|
|
272
|
-
if not table_name:
|
|
273
|
-
raise ValueError(f"Expected a non-empty value for `table_name` but received {table_name!r}")
|
|
274
|
-
return await self._get(
|
|
275
|
-
f"/db/tables/{table_name}/count",
|
|
276
|
-
options=make_request_options(
|
|
277
|
-
extra_headers=extra_headers,
|
|
278
|
-
extra_query=extra_query,
|
|
279
|
-
extra_body=extra_body,
|
|
280
|
-
timeout=timeout,
|
|
281
|
-
query=await async_maybe_transform(
|
|
282
|
-
{"environment": environment}, table_get_row_count_params.TableGetRowCountParams
|
|
283
|
-
),
|
|
284
|
-
),
|
|
285
|
-
cast_to=TableGetRowCountResponse,
|
|
286
|
-
)
|
|
287
|
-
|
|
288
|
-
async def retrieve_schema(
|
|
289
|
-
self,
|
|
290
|
-
table_name: str,
|
|
291
|
-
*,
|
|
292
|
-
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
293
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
294
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
295
|
-
extra_headers: Headers | None = None,
|
|
296
|
-
extra_query: Query | None = None,
|
|
297
|
-
extra_body: Body | None = None,
|
|
298
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
299
|
-
) -> TableRetrieveSchemaResponse:
|
|
300
|
-
"""
|
|
301
|
-
Returns detailed schema information for a specific table, including column
|
|
302
|
-
names, types, and constraints.
|
|
303
|
-
|
|
304
|
-
Args:
|
|
305
|
-
environment: Environment to query
|
|
306
|
-
|
|
307
|
-
extra_headers: Send extra headers
|
|
308
|
-
|
|
309
|
-
extra_query: Add additional query parameters to the request
|
|
310
|
-
|
|
311
|
-
extra_body: Add additional JSON properties to the request
|
|
312
|
-
|
|
313
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
314
|
-
"""
|
|
315
|
-
if not table_name:
|
|
316
|
-
raise ValueError(f"Expected a non-empty value for `table_name` but received {table_name!r}")
|
|
317
|
-
return await self._get(
|
|
318
|
-
f"/db/tables/{table_name}/schema",
|
|
319
|
-
options=make_request_options(
|
|
320
|
-
extra_headers=extra_headers,
|
|
321
|
-
extra_query=extra_query,
|
|
322
|
-
extra_body=extra_body,
|
|
323
|
-
timeout=timeout,
|
|
324
|
-
query=await async_maybe_transform(
|
|
325
|
-
{"environment": environment}, table_retrieve_schema_params.TableRetrieveSchemaParams
|
|
326
|
-
),
|
|
327
|
-
),
|
|
328
|
-
cast_to=TableRetrieveSchemaResponse,
|
|
329
|
-
)
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
class TablesResourceWithRawResponse:
|
|
333
|
-
def __init__(self, tables: TablesResource) -> None:
|
|
334
|
-
self._tables = tables
|
|
335
|
-
|
|
336
|
-
self.list = to_raw_response_wrapper(
|
|
337
|
-
tables.list,
|
|
338
|
-
)
|
|
339
|
-
self.get_row_count = to_raw_response_wrapper(
|
|
340
|
-
tables.get_row_count,
|
|
341
|
-
)
|
|
342
|
-
self.retrieve_schema = to_raw_response_wrapper(
|
|
343
|
-
tables.retrieve_schema,
|
|
344
|
-
)
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
class AsyncTablesResourceWithRawResponse:
|
|
348
|
-
def __init__(self, tables: AsyncTablesResource) -> None:
|
|
349
|
-
self._tables = tables
|
|
350
|
-
|
|
351
|
-
self.list = async_to_raw_response_wrapper(
|
|
352
|
-
tables.list,
|
|
353
|
-
)
|
|
354
|
-
self.get_row_count = async_to_raw_response_wrapper(
|
|
355
|
-
tables.get_row_count,
|
|
356
|
-
)
|
|
357
|
-
self.retrieve_schema = async_to_raw_response_wrapper(
|
|
358
|
-
tables.retrieve_schema,
|
|
359
|
-
)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
class TablesResourceWithStreamingResponse:
|
|
363
|
-
def __init__(self, tables: TablesResource) -> None:
|
|
364
|
-
self._tables = tables
|
|
365
|
-
|
|
366
|
-
self.list = to_streamed_response_wrapper(
|
|
367
|
-
tables.list,
|
|
368
|
-
)
|
|
369
|
-
self.get_row_count = to_streamed_response_wrapper(
|
|
370
|
-
tables.get_row_count,
|
|
371
|
-
)
|
|
372
|
-
self.retrieve_schema = to_streamed_response_wrapper(
|
|
373
|
-
tables.retrieve_schema,
|
|
374
|
-
)
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
class AsyncTablesResourceWithStreamingResponse:
|
|
378
|
-
def __init__(self, tables: AsyncTablesResource) -> None:
|
|
379
|
-
self._tables = tables
|
|
380
|
-
|
|
381
|
-
self.list = async_to_streamed_response_wrapper(
|
|
382
|
-
tables.list,
|
|
383
|
-
)
|
|
384
|
-
self.get_row_count = async_to_streamed_response_wrapper(
|
|
385
|
-
tables.get_row_count,
|
|
386
|
-
)
|
|
387
|
-
self.retrieve_schema = async_to_streamed_response_wrapper(
|
|
388
|
-
tables.retrieve_schema,
|
|
389
|
-
)
|
worqhat/resources/health.py
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from .._types import Body, Query, Headers, NotGiven, not_given
|
|
8
|
-
from .._compat import cached_property
|
|
9
|
-
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
-
from .._response import (
|
|
11
|
-
to_raw_response_wrapper,
|
|
12
|
-
to_streamed_response_wrapper,
|
|
13
|
-
async_to_raw_response_wrapper,
|
|
14
|
-
async_to_streamed_response_wrapper,
|
|
15
|
-
)
|
|
16
|
-
from .._base_client import make_request_options
|
|
17
|
-
from ..types.health_check_response import HealthCheckResponse
|
|
18
|
-
|
|
19
|
-
__all__ = ["HealthResource", "AsyncHealthResource"]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class HealthResource(SyncAPIResource):
|
|
23
|
-
@cached_property
|
|
24
|
-
def with_raw_response(self) -> HealthResourceWithRawResponse:
|
|
25
|
-
"""
|
|
26
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
-
the raw response object instead of the parsed content.
|
|
28
|
-
|
|
29
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
30
|
-
"""
|
|
31
|
-
return HealthResourceWithRawResponse(self)
|
|
32
|
-
|
|
33
|
-
@cached_property
|
|
34
|
-
def with_streaming_response(self) -> HealthResourceWithStreamingResponse:
|
|
35
|
-
"""
|
|
36
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
-
|
|
38
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
39
|
-
"""
|
|
40
|
-
return HealthResourceWithStreamingResponse(self)
|
|
41
|
-
|
|
42
|
-
def check(
|
|
43
|
-
self,
|
|
44
|
-
*,
|
|
45
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
46
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
47
|
-
extra_headers: Headers | None = None,
|
|
48
|
-
extra_query: Query | None = None,
|
|
49
|
-
extra_body: Body | None = None,
|
|
50
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
51
|
-
) -> HealthCheckResponse:
|
|
52
|
-
"""Check if the server is running and get uptime information.
|
|
53
|
-
|
|
54
|
-
This endpoint can be
|
|
55
|
-
used for monitoring and alerting systems.
|
|
56
|
-
"""
|
|
57
|
-
return self._get(
|
|
58
|
-
"/health",
|
|
59
|
-
options=make_request_options(
|
|
60
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
61
|
-
),
|
|
62
|
-
cast_to=HealthCheckResponse,
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class AsyncHealthResource(AsyncAPIResource):
|
|
67
|
-
@cached_property
|
|
68
|
-
def with_raw_response(self) -> AsyncHealthResourceWithRawResponse:
|
|
69
|
-
"""
|
|
70
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
71
|
-
the raw response object instead of the parsed content.
|
|
72
|
-
|
|
73
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
74
|
-
"""
|
|
75
|
-
return AsyncHealthResourceWithRawResponse(self)
|
|
76
|
-
|
|
77
|
-
@cached_property
|
|
78
|
-
def with_streaming_response(self) -> AsyncHealthResourceWithStreamingResponse:
|
|
79
|
-
"""
|
|
80
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
81
|
-
|
|
82
|
-
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
83
|
-
"""
|
|
84
|
-
return AsyncHealthResourceWithStreamingResponse(self)
|
|
85
|
-
|
|
86
|
-
async def check(
|
|
87
|
-
self,
|
|
88
|
-
*,
|
|
89
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
90
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
91
|
-
extra_headers: Headers | None = None,
|
|
92
|
-
extra_query: Query | None = None,
|
|
93
|
-
extra_body: Body | None = None,
|
|
94
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
95
|
-
) -> HealthCheckResponse:
|
|
96
|
-
"""Check if the server is running and get uptime information.
|
|
97
|
-
|
|
98
|
-
This endpoint can be
|
|
99
|
-
used for monitoring and alerting systems.
|
|
100
|
-
"""
|
|
101
|
-
return await self._get(
|
|
102
|
-
"/health",
|
|
103
|
-
options=make_request_options(
|
|
104
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
105
|
-
),
|
|
106
|
-
cast_to=HealthCheckResponse,
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class HealthResourceWithRawResponse:
|
|
111
|
-
def __init__(self, health: HealthResource) -> None:
|
|
112
|
-
self._health = health
|
|
113
|
-
|
|
114
|
-
self.check = to_raw_response_wrapper(
|
|
115
|
-
health.check,
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
class AsyncHealthResourceWithRawResponse:
|
|
120
|
-
def __init__(self, health: AsyncHealthResource) -> None:
|
|
121
|
-
self._health = health
|
|
122
|
-
|
|
123
|
-
self.check = async_to_raw_response_wrapper(
|
|
124
|
-
health.check,
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class HealthResourceWithStreamingResponse:
|
|
129
|
-
def __init__(self, health: HealthResource) -> None:
|
|
130
|
-
self._health = health
|
|
131
|
-
|
|
132
|
-
self.check = to_streamed_response_wrapper(
|
|
133
|
-
health.check,
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
class AsyncHealthResourceWithStreamingResponse:
|
|
138
|
-
def __init__(self, health: AsyncHealthResource) -> None:
|
|
139
|
-
self._health = health
|
|
140
|
-
|
|
141
|
-
self.check = async_to_streamed_response_wrapper(
|
|
142
|
-
health.check,
|
|
143
|
-
)
|
worqhat/types/__init__.py
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from .db_cluster_params import DBClusterParams as DBClusterParams
|
|
6
|
-
from .db_cluster_response import DBClusterResponse as DBClusterResponse
|
|
7
|
-
from .db_recommend_params import DBRecommendParams as DBRecommendParams
|
|
8
|
-
from .db_recommend_response import DBRecommendResponse as DBRecommendResponse
|
|
9
|
-
from .health_check_response import HealthCheckResponse as HealthCheckResponse
|
|
10
|
-
from .db_find_similar_params import DBFindSimilarParams as DBFindSimilarParams
|
|
11
|
-
from .db_execute_batch_params import DBExecuteBatchParams as DBExecuteBatchParams
|
|
12
|
-
from .db_execute_query_params import DBExecuteQueryParams as DBExecuteQueryParams
|
|
13
|
-
from .db_hybrid_search_params import DBHybridSearchParams as DBHybridSearchParams
|
|
14
|
-
from .db_insert_record_params import DBInsertRecordParams as DBInsertRecordParams
|
|
15
|
-
from .flow_get_metrics_params import FlowGetMetricsParams as FlowGetMetricsParams
|
|
16
|
-
from .db_delete_records_params import DBDeleteRecordsParams as DBDeleteRecordsParams
|
|
17
|
-
from .db_find_similar_response import DBFindSimilarResponse as DBFindSimilarResponse
|
|
18
|
-
from .db_update_records_params import DBUpdateRecordsParams as DBUpdateRecordsParams
|
|
19
|
-
from .get_server_info_response import GetServerInfoResponse as GetServerInfoResponse
|
|
20
|
-
from .db_execute_batch_response import DBExecuteBatchResponse as DBExecuteBatchResponse
|
|
21
|
-
from .db_execute_query_response import DBExecuteQueryResponse as DBExecuteQueryResponse
|
|
22
|
-
from .db_hybrid_search_response import DBHybridSearchResponse as DBHybridSearchResponse
|
|
23
|
-
from .db_insert_record_response import DBInsertRecordResponse as DBInsertRecordResponse
|
|
24
|
-
from .db_semantic_search_params import DBSemanticSearchParams as DBSemanticSearchParams
|
|
25
|
-
from .flow_get_metrics_response import FlowGetMetricsResponse as FlowGetMetricsResponse
|
|
26
|
-
from .db_delete_records_response import DBDeleteRecordsResponse as DBDeleteRecordsResponse
|
|
27
|
-
from .db_detect_anomalies_params import DBDetectAnomaliesParams as DBDetectAnomaliesParams
|
|
28
|
-
from .db_process_nl_query_params import DBProcessNlQueryParams as DBProcessNlQueryParams
|
|
29
|
-
from .db_update_records_response import DBUpdateRecordsResponse as DBUpdateRecordsResponse
|
|
30
|
-
from .storage_upload_file_params import StorageUploadFileParams as StorageUploadFileParams
|
|
31
|
-
from .db_semantic_search_response import DBSemanticSearchResponse as DBSemanticSearchResponse
|
|
32
|
-
from .db_detect_anomalies_response import DBDetectAnomaliesResponse as DBDetectAnomaliesResponse
|
|
33
|
-
from .db_process_nl_query_response import DBProcessNlQueryResponse as DBProcessNlQueryResponse
|
|
34
|
-
from .storage_upload_file_response import StorageUploadFileResponse as StorageUploadFileResponse
|
|
35
|
-
from .flow_trigger_with_file_params import FlowTriggerWithFileParams as FlowTriggerWithFileParams
|
|
36
|
-
from .flow_trigger_with_file_response import FlowTriggerWithFileResponse as FlowTriggerWithFileResponse
|
|
37
|
-
from .flow_trigger_with_payload_params import FlowTriggerWithPayloadParams as FlowTriggerWithPayloadParams
|
|
38
|
-
from .flow_trigger_with_payload_response import FlowTriggerWithPayloadResponse as FlowTriggerWithPayloadResponse
|
|
39
|
-
from .storage_delete_file_by_id_response import StorageDeleteFileByIDResponse as StorageDeleteFileByIDResponse
|
|
40
|
-
from .storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse as StorageRetrieveFileByIDResponse
|
|
41
|
-
from .storage_retrieve_file_by_path_params import StorageRetrieveFileByPathParams as StorageRetrieveFileByPathParams
|
|
42
|
-
from .storage_retrieve_file_by_path_response import (
|
|
43
|
-
StorageRetrieveFileByPathResponse as StorageRetrieveFileByPathResponse,
|
|
44
|
-
)
|
worqhat/types/db/__init__.py
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from .table_list_params import TableListParams as TableListParams
|
|
6
|
-
from .table_list_response import TableListResponse as TableListResponse
|
|
7
|
-
from .table_get_row_count_params import TableGetRowCountParams as TableGetRowCountParams
|
|
8
|
-
from .table_get_row_count_response import TableGetRowCountResponse as TableGetRowCountResponse
|
|
9
|
-
from .table_retrieve_schema_params import TableRetrieveSchemaParams as TableRetrieveSchemaParams
|
|
10
|
-
from .table_retrieve_schema_response import TableRetrieveSchemaResponse as TableRetrieveSchemaResponse
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing_extensions import Literal, TypedDict
|
|
6
|
-
|
|
7
|
-
__all__ = ["TableGetRowCountParams"]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class TableGetRowCountParams(TypedDict, total=False):
|
|
11
|
-
environment: Literal["development", "staging", "production"]
|
|
12
|
-
"""Environment to query"""
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from typing import Optional
|
|
4
|
-
|
|
5
|
-
from ..._models import BaseModel
|
|
6
|
-
|
|
7
|
-
__all__ = ["TableGetRowCountResponse"]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class TableGetRowCountResponse(BaseModel):
|
|
11
|
-
count: Optional[int] = None
|
|
12
|
-
|
|
13
|
-
success: Optional[bool] = None
|
|
14
|
-
|
|
15
|
-
table: Optional[str] = None
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing_extensions import Literal, TypedDict
|
|
6
|
-
|
|
7
|
-
__all__ = ["TableListParams"]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class TableListParams(TypedDict, total=False):
|
|
11
|
-
environment: Literal["development", "staging", "production"]
|
|
12
|
-
"""Environment to query (development, staging, production)"""
|
|
13
|
-
|
|
14
|
-
schema: str
|
|
15
|
-
"""Database schema to filter tables"""
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from typing import List, Optional
|
|
4
|
-
|
|
5
|
-
from pydantic import Field as FieldInfo
|
|
6
|
-
|
|
7
|
-
from ..._models import BaseModel
|
|
8
|
-
|
|
9
|
-
__all__ = ["TableListResponse", "Table"]
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Table(BaseModel):
|
|
13
|
-
name: Optional[str] = None
|
|
14
|
-
|
|
15
|
-
schema_: Optional[str] = FieldInfo(alias="schema", default=None)
|
|
16
|
-
|
|
17
|
-
type: Optional[str] = None
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class TableListResponse(BaseModel):
|
|
21
|
-
count: Optional[int] = None
|
|
22
|
-
"""Total number of tables"""
|
|
23
|
-
|
|
24
|
-
success: Optional[bool] = None
|
|
25
|
-
|
|
26
|
-
tables: Optional[List[Table]] = None
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing_extensions import Literal, TypedDict
|
|
6
|
-
|
|
7
|
-
__all__ = ["TableRetrieveSchemaParams"]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class TableRetrieveSchemaParams(TypedDict, total=False):
|
|
11
|
-
environment: Literal["development", "staging", "production"]
|
|
12
|
-
"""Environment to query"""
|