worqhat 3.8.0__tar.gz → 3.9.0__tar.gz
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-3.9.0/.release-please-manifest.json +3 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/CHANGELOG.md +9 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/PKG-INFO +1 -1
- {worqhat-3.8.0 → worqhat-3.9.0}/api.md +6 -8
- {worqhat-3.8.0 → worqhat-3.9.0}/pyproject.toml +1 -1
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_client.py +9 -10
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_version.py +1 -1
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/resources/__init__.py +14 -14
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/resources/db/db.py +18 -24
- {worqhat-3.8.0/src/worqhat/resources/client → worqhat-3.9.0/src/worqhat/resources}/storage.py +11 -11
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/__init__.py +8 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_execute_query_params.py +9 -4
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_process_nl_query_params.py +0 -3
- {worqhat-3.8.0/src/worqhat/types/client → worqhat-3.9.0/src/worqhat/types}/storage_delete_file_by_id_response.py +1 -1
- {worqhat-3.8.0/src/worqhat/types/client → worqhat-3.9.0/src/worqhat/types}/storage_retrieve_file_by_id_response.py +1 -1
- {worqhat-3.8.0/src/worqhat/types/client → worqhat-3.9.0/src/worqhat/types}/storage_retrieve_file_by_path_response.py +1 -1
- {worqhat-3.8.0/src/worqhat/types/client → worqhat-3.9.0/src/worqhat/types}/storage_upload_file_params.py +1 -1
- {worqhat-3.8.0/src/worqhat/types/client → worqhat-3.9.0/src/worqhat/types}/storage_upload_file_response.py +1 -1
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/api_resources/test_db.py +10 -18
- {worqhat-3.8.0/tests/api_resources/client → worqhat-3.9.0/tests/api_resources}/test_storage.py +31 -31
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_client.py +10 -22
- worqhat-3.8.0/.release-please-manifest.json +0 -3
- worqhat-3.8.0/src/worqhat/resources/client/__init__.py +0 -33
- worqhat-3.8.0/src/worqhat/resources/client/client.py +0 -102
- worqhat-3.8.0/src/worqhat/types/client/__init__.py +0 -12
- worqhat-3.8.0/tests/api_resources/db/__init__.py +0 -1
- {worqhat-3.8.0 → worqhat-3.9.0}/.gitignore +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/CONTRIBUTING.md +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/LICENSE +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/README.md +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/SECURITY.md +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/bin/check-release-environment +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/bin/publish-pypi +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/examples/.keep +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/noxfile.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/release-please-config.json +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/requirements-dev.lock +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/requirements.lock +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/__init__.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_base_client.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_compat.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_constants.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_exceptions.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_files.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_models.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_qs.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_resource.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_streaming.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_types.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/__init__.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_compat.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_datetime_parse.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_logs.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_proxy.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_reflection.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_resources_proxy.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_streams.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_sync.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_transform.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_typing.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/_utils/_utils.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/lib/.keep +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/py.typed +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/resources/db/__init__.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/resources/db/tables.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/resources/flows.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/resources/health.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/__init__.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/table_get_row_count_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/table_get_row_count_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/table_list_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/table_list_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/table_retrieve_schema_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db/table_retrieve_schema_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_delete_records_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_delete_records_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_execute_batch_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_execute_batch_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_execute_query_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_insert_record_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_insert_record_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_process_nl_query_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_update_records_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/db_update_records_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/flow_get_metrics_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/flow_get_metrics_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/flow_trigger_with_file_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/flow_trigger_with_file_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/flow_trigger_with_payload_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/flow_trigger_with_payload_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/get_server_info_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/src/worqhat/types/health_check_response.py +0 -0
- {worqhat-3.8.0/src/worqhat/types/client → worqhat-3.9.0/src/worqhat/types}/storage_retrieve_file_by_path_params.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/__init__.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/api_resources/__init__.py +0 -0
- {worqhat-3.8.0/tests/api_resources/client → worqhat-3.9.0/tests/api_resources/db}/__init__.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/api_resources/db/test_tables.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/api_resources/test_client.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/api_resources/test_flows.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/api_resources/test_health.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/conftest.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/sample_file.txt +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_deepcopy.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_extract_files.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_files.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_models.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_qs.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_required_args.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_response.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_streaming.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_transform.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_utils/test_proxy.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/test_utils/test_typing.py +0 -0
- {worqhat-3.8.0 → worqhat-3.9.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.9.0 (2025-10-24)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v3.8.0...v3.9.0](https://github.com/WorqHat/worqhat-python-sdk/compare/v3.8.0...v3.9.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([586bf23](https://github.com/WorqHat/worqhat-python-sdk/commit/586bf230bbe49f665d3dfc5a5c01be30c6ae56c4))
|
|
10
|
+
* **api:** manual updates ([af79b06](https://github.com/WorqHat/worqhat-python-sdk/commit/af79b065dff0f6d7d41312f7c197f433a7ab5489))
|
|
11
|
+
|
|
3
12
|
## 3.8.0 (2025-10-19)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v3.7.0...v3.8.0](https://github.com/WorqHat/worqhat-python-sdk/compare/v3.7.0...v3.8.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: worqhat
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.9.0
|
|
4
4
|
Summary: The official Python library for the worqhat API
|
|
5
5
|
Project-URL: Homepage, https://github.com/WorqHat/worqhat-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/WorqHat/worqhat-python-sdk
|
|
@@ -82,14 +82,12 @@ Methods:
|
|
|
82
82
|
- <code title="post /flows/file/{flowId}">client.flows.<a href="./src/worqhat/resources/flows.py">trigger_with_file</a>(flow_id, \*\*<a href="src/worqhat/types/flow_trigger_with_file_params.py">params</a>) -> <a href="./src/worqhat/types/flow_trigger_with_file_response.py">FlowTriggerWithFileResponse</a></code>
|
|
83
83
|
- <code title="post /flows/trigger/{flowId}">client.flows.<a href="./src/worqhat/resources/flows.py">trigger_with_payload</a>(flow_id, \*\*<a href="src/worqhat/types/flow_trigger_with_payload_params.py">params</a>) -> <a href="./src/worqhat/types/flow_trigger_with_payload_response.py">FlowTriggerWithPayloadResponse</a></code>
|
|
84
84
|
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
## Storage
|
|
85
|
+
# Storage
|
|
88
86
|
|
|
89
87
|
Types:
|
|
90
88
|
|
|
91
89
|
```python
|
|
92
|
-
from worqhat.types
|
|
90
|
+
from worqhat.types import (
|
|
93
91
|
StorageDeleteFileByIDResponse,
|
|
94
92
|
StorageRetrieveFileByIDResponse,
|
|
95
93
|
StorageRetrieveFileByPathResponse,
|
|
@@ -99,7 +97,7 @@ from worqhat.types.client import (
|
|
|
99
97
|
|
|
100
98
|
Methods:
|
|
101
99
|
|
|
102
|
-
- <code title="delete /storage/delete/{fileId}">client.
|
|
103
|
-
- <code title="get /storage/fetch/{fileId}">client.
|
|
104
|
-
- <code title="get /storage/fetch-by-path">client.
|
|
105
|
-
- <code title="post /storage/upload">client.
|
|
100
|
+
- <code title="delete /storage/delete/{fileId}">client.storage.<a href="./src/worqhat/resources/storage.py">delete_file_by_id</a>(file_id) -> <a href="./src/worqhat/types/storage_delete_file_by_id_response.py">StorageDeleteFileByIDResponse</a></code>
|
|
101
|
+
- <code title="get /storage/fetch/{fileId}">client.storage.<a href="./src/worqhat/resources/storage.py">retrieve_file_by_id</a>(file_id) -> <a href="./src/worqhat/types/storage_retrieve_file_by_id_response.py">StorageRetrieveFileByIDResponse</a></code>
|
|
102
|
+
- <code title="get /storage/fetch-by-path">client.storage.<a href="./src/worqhat/resources/storage.py">retrieve_file_by_path</a>(\*\*<a href="src/worqhat/types/storage_retrieve_file_by_path_params.py">params</a>) -> <a href="./src/worqhat/types/storage_retrieve_file_by_path_response.py">StorageRetrieveFileByPathResponse</a></code>
|
|
103
|
+
- <code title="post /storage/upload">client.storage.<a href="./src/worqhat/resources/storage.py">upload_file</a>(\*\*<a href="src/worqhat/types/storage_upload_file_params.py">params</a>) -> <a href="./src/worqhat/types/storage_upload_file_response.py">StorageUploadFileResponse</a></code>
|
|
@@ -30,7 +30,7 @@ from ._response import (
|
|
|
30
30
|
async_to_raw_response_wrapper,
|
|
31
31
|
async_to_streamed_response_wrapper,
|
|
32
32
|
)
|
|
33
|
-
from .resources import flows, health
|
|
33
|
+
from .resources import flows, health, storage
|
|
34
34
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
35
35
|
from ._exceptions import WorqhatError, APIStatusError
|
|
36
36
|
from ._base_client import (
|
|
@@ -40,7 +40,6 @@ from ._base_client import (
|
|
|
40
40
|
make_request_options,
|
|
41
41
|
)
|
|
42
42
|
from .resources.db import db
|
|
43
|
-
from .resources.client import client
|
|
44
43
|
from .types.get_server_info_response import GetServerInfoResponse
|
|
45
44
|
|
|
46
45
|
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Worqhat", "AsyncWorqhat", "Client", "AsyncClient"]
|
|
@@ -50,7 +49,7 @@ class Worqhat(SyncAPIClient):
|
|
|
50
49
|
db: db.DBResource
|
|
51
50
|
health: health.HealthResource
|
|
52
51
|
flows: flows.FlowsResource
|
|
53
|
-
|
|
52
|
+
storage: storage.StorageResource
|
|
54
53
|
with_raw_response: WorqhatWithRawResponse
|
|
55
54
|
with_streaming_response: WorqhatWithStreamedResponse
|
|
56
55
|
|
|
@@ -111,7 +110,7 @@ class Worqhat(SyncAPIClient):
|
|
|
111
110
|
self.db = db.DBResource(self)
|
|
112
111
|
self.health = health.HealthResource(self)
|
|
113
112
|
self.flows = flows.FlowsResource(self)
|
|
114
|
-
self.
|
|
113
|
+
self.storage = storage.StorageResource(self)
|
|
115
114
|
self.with_raw_response = WorqhatWithRawResponse(self)
|
|
116
115
|
self.with_streaming_response = WorqhatWithStreamedResponse(self)
|
|
117
116
|
|
|
@@ -243,7 +242,7 @@ class AsyncWorqhat(AsyncAPIClient):
|
|
|
243
242
|
db: db.AsyncDBResource
|
|
244
243
|
health: health.AsyncHealthResource
|
|
245
244
|
flows: flows.AsyncFlowsResource
|
|
246
|
-
|
|
245
|
+
storage: storage.AsyncStorageResource
|
|
247
246
|
with_raw_response: AsyncWorqhatWithRawResponse
|
|
248
247
|
with_streaming_response: AsyncWorqhatWithStreamedResponse
|
|
249
248
|
|
|
@@ -304,7 +303,7 @@ class AsyncWorqhat(AsyncAPIClient):
|
|
|
304
303
|
self.db = db.AsyncDBResource(self)
|
|
305
304
|
self.health = health.AsyncHealthResource(self)
|
|
306
305
|
self.flows = flows.AsyncFlowsResource(self)
|
|
307
|
-
self.
|
|
306
|
+
self.storage = storage.AsyncStorageResource(self)
|
|
308
307
|
self.with_raw_response = AsyncWorqhatWithRawResponse(self)
|
|
309
308
|
self.with_streaming_response = AsyncWorqhatWithStreamedResponse(self)
|
|
310
309
|
|
|
@@ -437,7 +436,7 @@ class WorqhatWithRawResponse:
|
|
|
437
436
|
self.db = db.DBResourceWithRawResponse(client.db)
|
|
438
437
|
self.health = health.HealthResourceWithRawResponse(client.health)
|
|
439
438
|
self.flows = flows.FlowsResourceWithRawResponse(client.flows)
|
|
440
|
-
self.
|
|
439
|
+
self.storage = storage.StorageResourceWithRawResponse(client.storage)
|
|
441
440
|
|
|
442
441
|
self.get_server_info = to_raw_response_wrapper(
|
|
443
442
|
client.get_server_info,
|
|
@@ -449,7 +448,7 @@ class AsyncWorqhatWithRawResponse:
|
|
|
449
448
|
self.db = db.AsyncDBResourceWithRawResponse(client.db)
|
|
450
449
|
self.health = health.AsyncHealthResourceWithRawResponse(client.health)
|
|
451
450
|
self.flows = flows.AsyncFlowsResourceWithRawResponse(client.flows)
|
|
452
|
-
self.
|
|
451
|
+
self.storage = storage.AsyncStorageResourceWithRawResponse(client.storage)
|
|
453
452
|
|
|
454
453
|
self.get_server_info = async_to_raw_response_wrapper(
|
|
455
454
|
client.get_server_info,
|
|
@@ -461,7 +460,7 @@ class WorqhatWithStreamedResponse:
|
|
|
461
460
|
self.db = db.DBResourceWithStreamingResponse(client.db)
|
|
462
461
|
self.health = health.HealthResourceWithStreamingResponse(client.health)
|
|
463
462
|
self.flows = flows.FlowsResourceWithStreamingResponse(client.flows)
|
|
464
|
-
self.
|
|
463
|
+
self.storage = storage.StorageResourceWithStreamingResponse(client.storage)
|
|
465
464
|
|
|
466
465
|
self.get_server_info = to_streamed_response_wrapper(
|
|
467
466
|
client.get_server_info,
|
|
@@ -473,7 +472,7 @@ class AsyncWorqhatWithStreamedResponse:
|
|
|
473
472
|
self.db = db.AsyncDBResourceWithStreamingResponse(client.db)
|
|
474
473
|
self.health = health.AsyncHealthResourceWithStreamingResponse(client.health)
|
|
475
474
|
self.flows = flows.AsyncFlowsResourceWithStreamingResponse(client.flows)
|
|
476
|
-
self.
|
|
475
|
+
self.storage = storage.AsyncStorageResourceWithStreamingResponse(client.storage)
|
|
477
476
|
|
|
478
477
|
self.get_server_info = async_to_streamed_response_wrapper(
|
|
479
478
|
client.get_server_info,
|
|
@@ -16,14 +16,6 @@ from .flows import (
|
|
|
16
16
|
FlowsResourceWithStreamingResponse,
|
|
17
17
|
AsyncFlowsResourceWithStreamingResponse,
|
|
18
18
|
)
|
|
19
|
-
from .client import (
|
|
20
|
-
ClientResource,
|
|
21
|
-
AsyncClientResource,
|
|
22
|
-
ClientResourceWithRawResponse,
|
|
23
|
-
AsyncClientResourceWithRawResponse,
|
|
24
|
-
ClientResourceWithStreamingResponse,
|
|
25
|
-
AsyncClientResourceWithStreamingResponse,
|
|
26
|
-
)
|
|
27
19
|
from .health import (
|
|
28
20
|
HealthResource,
|
|
29
21
|
AsyncHealthResource,
|
|
@@ -32,6 +24,14 @@ from .health import (
|
|
|
32
24
|
HealthResourceWithStreamingResponse,
|
|
33
25
|
AsyncHealthResourceWithStreamingResponse,
|
|
34
26
|
)
|
|
27
|
+
from .storage import (
|
|
28
|
+
StorageResource,
|
|
29
|
+
AsyncStorageResource,
|
|
30
|
+
StorageResourceWithRawResponse,
|
|
31
|
+
AsyncStorageResourceWithRawResponse,
|
|
32
|
+
StorageResourceWithStreamingResponse,
|
|
33
|
+
AsyncStorageResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
35
35
|
|
|
36
36
|
__all__ = [
|
|
37
37
|
"DBResource",
|
|
@@ -52,10 +52,10 @@ __all__ = [
|
|
|
52
52
|
"AsyncFlowsResourceWithRawResponse",
|
|
53
53
|
"FlowsResourceWithStreamingResponse",
|
|
54
54
|
"AsyncFlowsResourceWithStreamingResponse",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
55
|
+
"StorageResource",
|
|
56
|
+
"AsyncStorageResource",
|
|
57
|
+
"StorageResourceWithRawResponse",
|
|
58
|
+
"AsyncStorageResourceWithRawResponse",
|
|
59
|
+
"StorageResourceWithStreamingResponse",
|
|
60
|
+
"AsyncStorageResourceWithStreamingResponse",
|
|
61
61
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Iterable
|
|
5
|
+
from typing import Dict, Union, Iterable
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -23,7 +23,7 @@ from ...types import (
|
|
|
23
23
|
db_update_records_params,
|
|
24
24
|
db_process_nl_query_params,
|
|
25
25
|
)
|
|
26
|
-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
26
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
27
27
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
28
28
|
from ..._compat import cached_property
|
|
29
29
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -170,7 +170,7 @@ class DBResource(SyncAPIResource):
|
|
|
170
170
|
*,
|
|
171
171
|
query: str,
|
|
172
172
|
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
173
|
-
params: Dict[str, object] | Omit = omit,
|
|
173
|
+
params: Union[Dict[str, object], SequenceNotStr[Union[str, float, bool]]] | Omit = omit,
|
|
174
174
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
175
175
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
176
176
|
extra_headers: Headers | None = None,
|
|
@@ -178,18 +178,19 @@ class DBResource(SyncAPIResource):
|
|
|
178
178
|
extra_body: Body | None = None,
|
|
179
179
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
180
180
|
) -> DBExecuteQueryResponse:
|
|
181
|
-
"""Executes a raw SQL query directly against
|
|
181
|
+
"""Executes a raw SQL query directly against the database.
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
operations.
|
|
183
|
+
Supports both named
|
|
184
|
+
parameters ({param}) and positional parameters ($1, $2). Provides security
|
|
185
|
+
guardrails to prevent destructive operations.
|
|
186
186
|
|
|
187
187
|
Args:
|
|
188
|
-
query: SQL query to execute
|
|
188
|
+
query: SQL query to execute. Supports both named parameters ({param}) and positional
|
|
189
|
+
parameters ($1, $2)
|
|
189
190
|
|
|
190
191
|
environment: Environment to query (development, staging, production)
|
|
191
192
|
|
|
192
|
-
params:
|
|
193
|
+
params: Named parameters for queries with {param} syntax
|
|
193
194
|
|
|
194
195
|
extra_headers: Send extra headers
|
|
195
196
|
|
|
@@ -268,7 +269,6 @@ class DBResource(SyncAPIResource):
|
|
|
268
269
|
self,
|
|
269
270
|
*,
|
|
270
271
|
question: str,
|
|
271
|
-
table: str,
|
|
272
272
|
context: Dict[str, object] | Omit = omit,
|
|
273
273
|
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
274
274
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -285,8 +285,6 @@ class DBResource(SyncAPIResource):
|
|
|
285
285
|
Args:
|
|
286
286
|
question: Natural language question
|
|
287
287
|
|
|
288
|
-
table: Table name to query
|
|
289
|
-
|
|
290
288
|
context: Optional context for the query
|
|
291
289
|
|
|
292
290
|
environment: Environment to query (development, staging, production)
|
|
@@ -304,7 +302,6 @@ class DBResource(SyncAPIResource):
|
|
|
304
302
|
body=maybe_transform(
|
|
305
303
|
{
|
|
306
304
|
"question": question,
|
|
307
|
-
"table": table,
|
|
308
305
|
"context": context,
|
|
309
306
|
"environment": environment,
|
|
310
307
|
},
|
|
@@ -495,7 +492,7 @@ class AsyncDBResource(AsyncAPIResource):
|
|
|
495
492
|
*,
|
|
496
493
|
query: str,
|
|
497
494
|
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
498
|
-
params: Dict[str, object] | Omit = omit,
|
|
495
|
+
params: Union[Dict[str, object], SequenceNotStr[Union[str, float, bool]]] | Omit = omit,
|
|
499
496
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
500
497
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
501
498
|
extra_headers: Headers | None = None,
|
|
@@ -503,18 +500,19 @@ class AsyncDBResource(AsyncAPIResource):
|
|
|
503
500
|
extra_body: Body | None = None,
|
|
504
501
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
505
502
|
) -> DBExecuteQueryResponse:
|
|
506
|
-
"""Executes a raw SQL query directly against
|
|
503
|
+
"""Executes a raw SQL query directly against the database.
|
|
507
504
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
operations.
|
|
505
|
+
Supports both named
|
|
506
|
+
parameters ({param}) and positional parameters ($1, $2). Provides security
|
|
507
|
+
guardrails to prevent destructive operations.
|
|
511
508
|
|
|
512
509
|
Args:
|
|
513
|
-
query: SQL query to execute
|
|
510
|
+
query: SQL query to execute. Supports both named parameters ({param}) and positional
|
|
511
|
+
parameters ($1, $2)
|
|
514
512
|
|
|
515
513
|
environment: Environment to query (development, staging, production)
|
|
516
514
|
|
|
517
|
-
params:
|
|
515
|
+
params: Named parameters for queries with {param} syntax
|
|
518
516
|
|
|
519
517
|
extra_headers: Send extra headers
|
|
520
518
|
|
|
@@ -593,7 +591,6 @@ class AsyncDBResource(AsyncAPIResource):
|
|
|
593
591
|
self,
|
|
594
592
|
*,
|
|
595
593
|
question: str,
|
|
596
|
-
table: str,
|
|
597
594
|
context: Dict[str, object] | Omit = omit,
|
|
598
595
|
environment: Literal["development", "staging", "production"] | Omit = omit,
|
|
599
596
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -610,8 +607,6 @@ class AsyncDBResource(AsyncAPIResource):
|
|
|
610
607
|
Args:
|
|
611
608
|
question: Natural language question
|
|
612
609
|
|
|
613
|
-
table: Table name to query
|
|
614
|
-
|
|
615
610
|
context: Optional context for the query
|
|
616
611
|
|
|
617
612
|
environment: Environment to query (development, staging, production)
|
|
@@ -629,7 +624,6 @@ class AsyncDBResource(AsyncAPIResource):
|
|
|
629
624
|
body=await async_maybe_transform(
|
|
630
625
|
{
|
|
631
626
|
"question": question,
|
|
632
|
-
"table": table,
|
|
633
627
|
"context": context,
|
|
634
628
|
"environment": environment,
|
|
635
629
|
},
|
{worqhat-3.8.0/src/worqhat/resources/client → worqhat-3.9.0/src/worqhat/resources}/storage.py
RENAMED
|
@@ -6,22 +6,22 @@ from typing import Mapping, cast
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
9
|
+
from ..types import storage_upload_file_params, storage_retrieve_file_by_path_params
|
|
10
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
|
|
11
|
+
from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
|
|
12
|
+
from .._compat import cached_property
|
|
13
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from .._response import (
|
|
14
15
|
to_raw_response_wrapper,
|
|
15
16
|
to_streamed_response_wrapper,
|
|
16
17
|
async_to_raw_response_wrapper,
|
|
17
18
|
async_to_streamed_response_wrapper,
|
|
18
19
|
)
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from ...types.client.storage_retrieve_file_by_path_response import StorageRetrieveFileByPathResponse
|
|
20
|
+
from .._base_client import make_request_options
|
|
21
|
+
from ..types.storage_upload_file_response import StorageUploadFileResponse
|
|
22
|
+
from ..types.storage_delete_file_by_id_response import StorageDeleteFileByIDResponse
|
|
23
|
+
from ..types.storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse
|
|
24
|
+
from ..types.storage_retrieve_file_by_path_response import StorageRetrieveFileByPathResponse
|
|
25
25
|
|
|
26
26
|
__all__ = ["StorageResource", "AsyncStorageResource"]
|
|
27
27
|
|
|
@@ -17,8 +17,16 @@ from .flow_get_metrics_response import FlowGetMetricsResponse as FlowGetMetricsR
|
|
|
17
17
|
from .db_delete_records_response import DBDeleteRecordsResponse as DBDeleteRecordsResponse
|
|
18
18
|
from .db_process_nl_query_params import DBProcessNlQueryParams as DBProcessNlQueryParams
|
|
19
19
|
from .db_update_records_response import DBUpdateRecordsResponse as DBUpdateRecordsResponse
|
|
20
|
+
from .storage_upload_file_params import StorageUploadFileParams as StorageUploadFileParams
|
|
20
21
|
from .db_process_nl_query_response import DBProcessNlQueryResponse as DBProcessNlQueryResponse
|
|
22
|
+
from .storage_upload_file_response import StorageUploadFileResponse as StorageUploadFileResponse
|
|
21
23
|
from .flow_trigger_with_file_params import FlowTriggerWithFileParams as FlowTriggerWithFileParams
|
|
22
24
|
from .flow_trigger_with_file_response import FlowTriggerWithFileResponse as FlowTriggerWithFileResponse
|
|
23
25
|
from .flow_trigger_with_payload_params import FlowTriggerWithPayloadParams as FlowTriggerWithPayloadParams
|
|
24
26
|
from .flow_trigger_with_payload_response import FlowTriggerWithPayloadResponse as FlowTriggerWithPayloadResponse
|
|
27
|
+
from .storage_delete_file_by_id_response import StorageDeleteFileByIDResponse as StorageDeleteFileByIDResponse
|
|
28
|
+
from .storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse as StorageRetrieveFileByIDResponse
|
|
29
|
+
from .storage_retrieve_file_by_path_params import StorageRetrieveFileByPathParams as StorageRetrieveFileByPathParams
|
|
30
|
+
from .storage_retrieve_file_by_path_response import (
|
|
31
|
+
StorageRetrieveFileByPathResponse as StorageRetrieveFileByPathResponse,
|
|
32
|
+
)
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
5
|
+
from typing import Dict, Union
|
|
6
6
|
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
8
10
|
__all__ = ["DBExecuteQueryParams"]
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
class DBExecuteQueryParams(TypedDict, total=False):
|
|
12
14
|
query: Required[str]
|
|
13
|
-
"""SQL query to execute
|
|
15
|
+
"""SQL query to execute.
|
|
16
|
+
|
|
17
|
+
Supports both named parameters ({param}) and positional parameters ($1, $2)
|
|
18
|
+
"""
|
|
14
19
|
|
|
15
20
|
environment: Literal["development", "staging", "production"]
|
|
16
21
|
"""Environment to query (development, staging, production)"""
|
|
17
22
|
|
|
18
|
-
params: Dict[str, object]
|
|
19
|
-
"""
|
|
23
|
+
params: Union[Dict[str, object], SequenceNotStr[Union[str, float, bool]]]
|
|
24
|
+
"""Named parameters for queries with {param} syntax"""
|
|
@@ -144,7 +144,7 @@ class TestDB:
|
|
|
144
144
|
@parametrize
|
|
145
145
|
def test_method_execute_query(self, client: Worqhat) -> None:
|
|
146
146
|
db = client.db.execute_query(
|
|
147
|
-
query="SELECT * FROM users WHERE
|
|
147
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
148
148
|
)
|
|
149
149
|
assert_matches_type(DBExecuteQueryResponse, db, path=["response"])
|
|
150
150
|
|
|
@@ -152,9 +152,9 @@ class TestDB:
|
|
|
152
152
|
@parametrize
|
|
153
153
|
def test_method_execute_query_with_all_params(self, client: Worqhat) -> None:
|
|
154
154
|
db = client.db.execute_query(
|
|
155
|
-
query="SELECT * FROM users WHERE
|
|
155
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
156
156
|
environment="production",
|
|
157
|
-
params={"
|
|
157
|
+
params={"slug": "bar"},
|
|
158
158
|
)
|
|
159
159
|
assert_matches_type(DBExecuteQueryResponse, db, path=["response"])
|
|
160
160
|
|
|
@@ -162,7 +162,7 @@ class TestDB:
|
|
|
162
162
|
@parametrize
|
|
163
163
|
def test_raw_response_execute_query(self, client: Worqhat) -> None:
|
|
164
164
|
response = client.db.with_raw_response.execute_query(
|
|
165
|
-
query="SELECT * FROM users WHERE
|
|
165
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
166
166
|
)
|
|
167
167
|
|
|
168
168
|
assert response.is_closed is True
|
|
@@ -174,7 +174,7 @@ class TestDB:
|
|
|
174
174
|
@parametrize
|
|
175
175
|
def test_streaming_response_execute_query(self, client: Worqhat) -> None:
|
|
176
176
|
with client.db.with_streaming_response.execute_query(
|
|
177
|
-
query="SELECT * FROM users WHERE
|
|
177
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
178
178
|
) as response:
|
|
179
179
|
assert not response.is_closed
|
|
180
180
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -248,7 +248,6 @@ class TestDB:
|
|
|
248
248
|
def test_method_process_nl_query(self, client: Worqhat) -> None:
|
|
249
249
|
db = client.db.process_nl_query(
|
|
250
250
|
question="How many active users do we have?",
|
|
251
|
-
table="users",
|
|
252
251
|
)
|
|
253
252
|
assert_matches_type(DBProcessNlQueryResponse, db, path=["response"])
|
|
254
253
|
|
|
@@ -257,7 +256,6 @@ class TestDB:
|
|
|
257
256
|
def test_method_process_nl_query_with_all_params(self, client: Worqhat) -> None:
|
|
258
257
|
db = client.db.process_nl_query(
|
|
259
258
|
question="How many active users do we have?",
|
|
260
|
-
table="users",
|
|
261
259
|
context={"foo": "bar"},
|
|
262
260
|
environment="production",
|
|
263
261
|
)
|
|
@@ -268,7 +266,6 @@ class TestDB:
|
|
|
268
266
|
def test_raw_response_process_nl_query(self, client: Worqhat) -> None:
|
|
269
267
|
response = client.db.with_raw_response.process_nl_query(
|
|
270
268
|
question="How many active users do we have?",
|
|
271
|
-
table="users",
|
|
272
269
|
)
|
|
273
270
|
|
|
274
271
|
assert response.is_closed is True
|
|
@@ -281,7 +278,6 @@ class TestDB:
|
|
|
281
278
|
def test_streaming_response_process_nl_query(self, client: Worqhat) -> None:
|
|
282
279
|
with client.db.with_streaming_response.process_nl_query(
|
|
283
280
|
question="How many active users do we have?",
|
|
284
|
-
table="users",
|
|
285
281
|
) as response:
|
|
286
282
|
assert not response.is_closed
|
|
287
283
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -468,7 +464,7 @@ class TestAsyncDB:
|
|
|
468
464
|
@parametrize
|
|
469
465
|
async def test_method_execute_query(self, async_client: AsyncWorqhat) -> None:
|
|
470
466
|
db = await async_client.db.execute_query(
|
|
471
|
-
query="SELECT * FROM users WHERE
|
|
467
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
472
468
|
)
|
|
473
469
|
assert_matches_type(DBExecuteQueryResponse, db, path=["response"])
|
|
474
470
|
|
|
@@ -476,9 +472,9 @@ class TestAsyncDB:
|
|
|
476
472
|
@parametrize
|
|
477
473
|
async def test_method_execute_query_with_all_params(self, async_client: AsyncWorqhat) -> None:
|
|
478
474
|
db = await async_client.db.execute_query(
|
|
479
|
-
query="SELECT * FROM users WHERE
|
|
475
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
480
476
|
environment="production",
|
|
481
|
-
params={"
|
|
477
|
+
params={"slug": "bar"},
|
|
482
478
|
)
|
|
483
479
|
assert_matches_type(DBExecuteQueryResponse, db, path=["response"])
|
|
484
480
|
|
|
@@ -486,7 +482,7 @@ class TestAsyncDB:
|
|
|
486
482
|
@parametrize
|
|
487
483
|
async def test_raw_response_execute_query(self, async_client: AsyncWorqhat) -> None:
|
|
488
484
|
response = await async_client.db.with_raw_response.execute_query(
|
|
489
|
-
query="SELECT * FROM users WHERE
|
|
485
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
490
486
|
)
|
|
491
487
|
|
|
492
488
|
assert response.is_closed is True
|
|
@@ -498,7 +494,7 @@ class TestAsyncDB:
|
|
|
498
494
|
@parametrize
|
|
499
495
|
async def test_streaming_response_execute_query(self, async_client: AsyncWorqhat) -> None:
|
|
500
496
|
async with async_client.db.with_streaming_response.execute_query(
|
|
501
|
-
query="SELECT * FROM users WHERE
|
|
497
|
+
query="SELECT * FROM users WHERE slug = {slug}",
|
|
502
498
|
) as response:
|
|
503
499
|
assert not response.is_closed
|
|
504
500
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -572,7 +568,6 @@ class TestAsyncDB:
|
|
|
572
568
|
async def test_method_process_nl_query(self, async_client: AsyncWorqhat) -> None:
|
|
573
569
|
db = await async_client.db.process_nl_query(
|
|
574
570
|
question="How many active users do we have?",
|
|
575
|
-
table="users",
|
|
576
571
|
)
|
|
577
572
|
assert_matches_type(DBProcessNlQueryResponse, db, path=["response"])
|
|
578
573
|
|
|
@@ -581,7 +576,6 @@ class TestAsyncDB:
|
|
|
581
576
|
async def test_method_process_nl_query_with_all_params(self, async_client: AsyncWorqhat) -> None:
|
|
582
577
|
db = await async_client.db.process_nl_query(
|
|
583
578
|
question="How many active users do we have?",
|
|
584
|
-
table="users",
|
|
585
579
|
context={"foo": "bar"},
|
|
586
580
|
environment="production",
|
|
587
581
|
)
|
|
@@ -592,7 +586,6 @@ class TestAsyncDB:
|
|
|
592
586
|
async def test_raw_response_process_nl_query(self, async_client: AsyncWorqhat) -> None:
|
|
593
587
|
response = await async_client.db.with_raw_response.process_nl_query(
|
|
594
588
|
question="How many active users do we have?",
|
|
595
|
-
table="users",
|
|
596
589
|
)
|
|
597
590
|
|
|
598
591
|
assert response.is_closed is True
|
|
@@ -605,7 +598,6 @@ class TestAsyncDB:
|
|
|
605
598
|
async def test_streaming_response_process_nl_query(self, async_client: AsyncWorqhat) -> None:
|
|
606
599
|
async with async_client.db.with_streaming_response.process_nl_query(
|
|
607
600
|
question="How many active users do we have?",
|
|
608
|
-
table="users",
|
|
609
601
|
) as response:
|
|
610
602
|
assert not response.is_closed
|
|
611
603
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|